In this post I will go though the steps you need to do if you want to call an api on Adobe I/O.
- Being an admin on your Adobe Marketingcloud instance
- PostMan installed on your system
- openssl available (for windows-user you need to install this)
Step 1: Generating keys
First thing needed is to create public/private keys, or use the ones that were provided.
Via this command you can generate the public and private key:
openssl req -nodes -text -x509 -newkey rsa:2048 -keyout secret.pem -out certificate.pem -days 356
This will give you two files:
- certificate.pem (public key)
- secret.pem (private key)
Step 2: Setup integration
Now you can create your integration on https://console.adobe.io/integrations
Choose “New integration”
Choose “Access an API”
Select the service you want to integrate with
When creating a new integration, then choose “New integration”
In the final step specify the public-key (certificate.pem), and the title + description for the integration.
Step 3: Generating your access token
Now that you have created your integration, you need to generate your access-token (so called Bearer-token). For this we will use PostMan to generate this.
Go to the JWT-tab in your integration:
In the section “Paste Private Key”, you need to specify the full contents of secret.pem.
Then press the button “Generate JWT”
Now you can use “Sample CURL command“to generate the access-token.
Copy this, and open PostMan
Choose to “Import” the curl command to create the request in PostMan.
After the import you can execute the request to generate the access-token
The value of access_token will be used further on in the blogpost
Step 4: Execute the api-call
Now that we have the Bearer-token, we can execute an api call
For this I will use this endpoint to receive all profiles from Adobe Campaign Standard: https://mc.adobe.io/acs054.msavlab.adobe.com/campaign/profileAndServices/profile/
For this two things are needed:
x-api-key, this is the client-id from your integration
authorization: This is the bearer token from the previous step, with ‘Bearer ’ in front
Now you can execute your Adobe I/O api-calls!