How to Call an Adobe API using Adobe I/O

Hiren Anand Shah
Nov 22, 2018 · 5 min read

Adobe I/O is the place for developers looking to integrate, extend, and create apps and experiences based on Adobe’s products and technologies. In this post, I’ll break down the steps to making your first Adobe API call using Adobe I/O.

Pre-req­ui­sites:

  • You need to be a System Administrator / Developer on your Adobe Mar­ket­ing Cloud instance.
  • You need Post­man installed on your sys­tem.

Adobe APIs support two type of integrations:

  1. OAuth Integration (OAuth 2.0 authentication flow)
  2. Service Account Integration (JWT authentication flow)

To call any Adobe API you will need to create an integration in Adobe I/O Console: https://console.adobe.io/integrations.

Image for post
Image for post
Image for post
Image for post
Image for post
Image for post

But how will you identify if the API that you want to call is OAuth Integration type or Service Account Integration type?

  • For the APIs that support both types of integration you will see the option below:
Image for post
Image for post

For many other APIs that just support one integration type you might not see this option. In that case, if an API supports the OAuth Integration type, you will see the below screen after choosing an API -> New Integration.

Image for post
Image for post
OAuth Integration type.

If an API supports the Service Account Integration type you will see the below screen after choosing an API -> New Integration.

Image for post
Image for post
Service Account Integration type.

You have now identified the type of the integration. Next, follow the steps below to generate an access token and make your first API call:

  1. OAuth Integration (OAuth 2.0 authentication flow)

As an example, let’s assume you want to call an Adobe Analytics API using the OAuth integration type.

  • Open Adobe I/O Console in browser. https://console.adobe.io
  • Login and click on “New Integration” (ensure that the correct Adobe Marketing Cloud instance is selected in the dropdown menu).
Image for post
Image for post
  • Select “Access an API” and click on continue.
Image for post
Image for post
  • Click on “Adobe Analytics” under Experience Cloud and select “OAuth Integration,” then click on “Continue”-> “New Integration.”
Image for post
Image for post
Image for post
Image for post
  • You will see that you’ve created your integration and client credentials have been generated.
Image for post
Image for post
curl -X GET \
https://analytics.adobe.io/discovery/me \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <INSERT_ACCESS_TOKEN_HERE>' \
-H 'x-api-key: <INSERT_CLIENT_ID_HERE>'
  • In the above cURL command, enter your access token and the Client ID.
  • Open Postman, and in top left corner, click on Import ->Paste Raw Text. Paste the prepared cURL command and then click on “Import.”
Image for post
Image for post
Image for post
Image for post
  • Click on “Send,” and you should receive a 200 OK response.
Image for post
Image for post

Congratulations! You have just made a successful Adobe Analytics API call using OAuth Integration.

2. Service Account Integration (JWT authentication flow)

As an example, let’s assume you want to call an Adobe Launch API using the Service Account Integration.

  • Open Adobe I/O Console in browser. https://console.adobe.io
  • Login and click on “New Integration” (ensure that the correct Adobe Marketing Cloud instance is selected in the dropdown menu).
Image for post
Image for post
  • Select “Access an API” and click on continue.
Image for post
Image for post
  • Click on “Experience Platform Launch API” under Adobe Experience Platform and click on “Continue”-> “New Integration.”
Image for post
Image for post
curl https://reactor.adobe.io/companies \
-H "Accept: application/vnd.api+json;revision=1" \
-H "Content-Type: application/vnd.api+json" \
-H "Authorization: Bearer <INSERT_ACCESS_TOKEN_HERE>" \
-H "X-Api-Key: <INSERT_CLIENT_ID_HERE>" \
-X GET
  • In the above cURL command, enter your access token and the Client ID.
  • Open Postman, in the top left corner, and click on Import ->Paste Raw Text, then paste the prepared cURL command and click on “Import.”
Image for post
Image for post
Image for post
Image for post
  • Click on “Send,” and you should receive a 200 OK response.
Image for post
Image for post

Congratulations! You have made a successful Adobe Launch API call using Service Account Integration.

Adobe Tech Blog

News, updates, and thoughts related to Adobe, developers…

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store