How to Call an Adobe API using Adobe I/O

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 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)
    e.g. Adobe Stock, Creative SDK, Photoshop, Adobe Analytics, etc.
  2. Service Account Integration (JWT authentication flow)
    e.g. Adobe Campaign, Adobe Launch, Adobe Target, etc.

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

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:

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.

OAuth Integration type.
If an integration asks you to provide a “Default Redirect URI” and “Redirect URI Pattern,” it is an OAuth Integration type.

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

Service Account Integration type.
If an integration asks you to provide “Public keys certificates,” it is a 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).
  • Select “Access an API” and click on continue.
  • Click on “Adobe Analytics” under Experience Cloud and select “OAuth Integration,” then click on “Continue”-> “New Integration.”
  • You will see that you’ve created your integration and client credentials have been generated.
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.”
  • Click on “Send,” and you should receive a 200 OK response.

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).
  • Select “Access an API” and click on continue.
  • Click on “Experience Platform Launch API” under Adobe Experience Platform and click on “Continue”-> “New Integration.”
curl https://mc-api-activation-reactor-integration.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.”
  • Click on “Send,” and you should receive a 200 OK response.

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

Follow the Adobe Tech Blog for more developer stories and resources, and check out Adobe I/O on Twitter for the latest news and developer products.