Authentication

Some endpoints, such as collect or interact, support both authenticated events and non-authenticated events.

Authenticated API calls allow for secure collection of sensitive data according to your organization's privacy policies. Each type of call uses a different hostname:

You can configure a datastream to accept either authenticated or non-authenticated events, or you can configure it to only accept authenticated events. See the documentation on how to create and configure datastreams for more information. A datastream accepts both authenticated and non-authenticated events by default.

All authenticated events require the following three headers in every API call:

Prerequisites

Before you make calls to the Edge Network API, make sure that you meet the following prerequisites:

If you meet both of the above criteria, you can perform both of the following vital tasks:

Authorization

The Authorization header contains a token that authenticates your API call. You can quickly generate an access token in your Adobe Developer project using the following steps:

  1. Log in to the Adobe Developer Console.
  2. Navigate to Projects, and select the desired project (or create one).
  3. Under Credentials, select OAuth Server-to-Server.
  4. Click the Generate access token button.

See server to server authentication in the Adobe Developer authentication guide for instructions on how to programmatically obtain this token. This header uses the following format:

Authorization: Bearer eyJ[...]rtw

x-api-key

The x-api-key header contains the API sandbox identifier. You can obtain this key in your Adobe Developer project:

  1. Log in to the Adobe Developer Console.
  2. Navigate to Projects, and select the desired project (or create one).
  3. Under Credentials, select OAuth Server-to-Server.
  4. Copy the Client ID on the page.

This header uses the following format:

x-api-key: a52cf[...]1ed71

x-gw-ims-org-id

The x-gw-ims-org-id contains the IMS org of the API project you're working in. You can obtain this identifier using the following steps:

  1. Log in to Adobe Experience Platform
  2. On any page in the Platform UI, press [Ctrl] + [I].
  3. Locate the Current Org ID in the User Information tab. You might need to scroll to locate this field.

This header uses the following format:

x-gw-ims-org-id: 53A[...]C99@AdobeOrg

Troubleshooting

If an authenticated request fails with an EXEG-05xx error code, see Authorization errors for the cause of each error, whether it is retriable, and how to resolve it.