Authentication for the Sitecore CDP REST APIs

Abstract

Provides information on authentication for the Sitecore CDP REST APIs, including where to access the client key and API token (Data model 2.1).

Sitecore CDP supports Basic Authentication for the Sitecore CDP REST API. You must send each request to the Sitecore CDP REST API over HTTPS. HTTP is not supported.

An API token is a unique key that Sitecore provides your organization to authenticate your services, such as a website or mobile app, when making calls to the REST API.

To obtain your client key and API token from Sitecore CDP, in the navigation pane, click Settings, API Access.

When using an API key with basic authentication, the following applies:

  • HTTP basic username - apiKey.id value

  • HTTP basic password - apiKey.secret value

The following is an example of how to include the apiKey.id value and apiKey.secret value in a cURL command:

curl -u ${apiKey.id}:${apiKey.secret} \ -H "Accept: application/json" \ -L https://{apiEndpoint}/v2/someCollection