In this post I will go though the steps you need to do if you want to call an api on Adobe I/O.

pre-req­ui­sites:

  • Being an admin on your Adobe Mar­ket­ing Cloud instance
  • Post­Man installed on your sys­tem
  • openssl avail­able (for win­dows-user you need to install this)

Step 1: Generating keys

First thing need­ed is to cre­ate public/private keys, or use the ones that were pro­vid­ed.

Via this com­mand you can gen­er­ate the pub­lic and pri­vate 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 (pub­lic key)
  • secret.pem (pri­vate key)

Step 2: Setup integration

Now you can cre­ate your inte­gra­tion on https://​con​sole​.adobe​.io/​i​n​t​e​g​r​a​t​i​ons

Choose “New inte­gra­tion”

Choose “Access an API”

Select the ser­vice you want to inte­grate with

When cre­at­ing a new inte­gra­tion, then choose “New inte­gra­tion”

In the final step spec­i­fy the pub­lic-key (certificate.pem), and the title + descrip­tion for the inte­gra­tion.

Step 3: Generating your access-token

Now that you have cre­at­ed your inte­gra­tion, you need to gen­er­ate your access-token. For this we will use Post­Man to gen­er­ate this.

Go to the JWT-tab in your inte­gra­tion:

In the sec­tion “Paste Pri­vate Key”, you need to spec­i­fy the full con­tents of secret.pem.

Then press the but­ton “Gen­er­ate JWT”

Now you can use “Sam­ple CURL command“to gen­er­ate the access-token.

Copy this, and open Post­Man

Choose to “Import” the curl com­mand to cre­ate the request in Post­Man.

After the import you can exe­cute the request to gen­er­ate the access-token

The val­ue of access_token will be used fur­ther on in the blog­post

Step 4: Execute the api-call

Now that we have the access-token, we can exe­cute an api call

For this I will use this end­point to receive all pro­files from Adobe Cam­paign Standard: https://mc.adobe.io/acs054.msavlab.adobe.com/campaign/profileAndServices/profile/

For this two things are need­ed:

x-api-key, this is the client-id from your inte­gra­tion

autho­riza­tion: This is the access-token from the pre­vi­ous step, with ‘Bear­er ’ in front

Now you can exe­cute your Adobe I/O api-calls!

0 comments