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 platform

  3. Click the API Keys tab.

    Callout of the 'API Keys' tab on the Sites page

  4. Select a user from the list on the left, and then click CREATE PUBLIC KEY.

    If you need to create a new user for the API key, follow the steps in Creating an API User in Manage API Keys.

    Callout of the 'CREATE PUBLIC KEY' button on the 'API Keys' tab of the Sites page

  5. Paste a PEM-formatted public key into the required text area input field.

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

  6. Click SAVE.

    Callout of the SAVE button on the 'Public Key Details' modal