Step 2: Create an API Public Key

After you configure a computer to generate public keys, you can generate a public key within the terminal so that you can then create an API user with an associated public key in the Monetate platform.

  1. Launch a terminal window and then type ssh-keygen -t rsa.
  2. When prompted, type a filename in which to store the key. Ensure the name is easy to remember and find.

    Avoid entering a passphrase when you create a public key.

  3. After the terminal generates the key fingerprint, type the following in the terminal window:
    ssh-keygen -f ~/.ssh/ -e -m pem
  4. Highlight and copy the generated RSA public key, which should look like this example:
    -----BEGIN RSA PUBLIC KEY-----
    -----END RSA PUBLIC KEY----- 

Ensure that you copy the entire public key, starting with -----BEGIN RSA PUBLIC KEY----- all the way through ----END RSA PUBLIC KEY-----.

Adding a Public Key to a Monetate API User

After you create the public key, add it to an API user in your Monetate account.

  1. Log into the Monetate platform.
  2. Click the settings cog and then select Sites.

    Callout of the Sites option in the settings menu of the Monetate menu

  3. Click the API Keys tab.

    Callout of the API Key tab on the Site page

  4. Click to select an existing API user, or create an new one by following the steps in Creating an API User in the Manage API Keys documentation.

    Callout of the list of existing API users on the API Keys tab


    Callout of the CREATE PUBLIC KEY button

  6. Paste the RSA public key you generated into Public Key, and then click SAVE.

    Callout of the Public Key text field on the Public Key Details modal