Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
CDPCloud Portal
Sitecore CDP Developer Documentation
  • Developing with Sitecore CDP
        • API keys
        • Create an API key
        • Request an access token
    • Base URL
    • Response codes
    • REST API Guest v2.1
    • REST API Guest data extension v2.1
    • REST API Order v2.1
    • REST API Order contact v2.1
    • REST API Order consumer v2.1
    • REST API Order data extension v2.1
    • REST API Order item data extension v2.1
    • REST API Audience export
  1. Authentication and authorization
  1. REST APIs
  2. Authentication and authorization
  3. Request an access token

Request an access token

POST https://auth.sitecorecloud.io/oauth/token

Make a POST request to request an access token. Replace the placeholder values with your API key and API secret.

In the response, the access_token key contains the access token.

curl -X POST 'https://auth.sitecorecloud.io/oauth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<APIKey>' \
--data-urlencode 'client_secret=<APISecret>' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'audience=https://api.sitecorecloud.io'
{
    "access_token": "<accessToken>",
    "scope": "cdp.audience_exports:r",
    "expires_in": 86400,
    "token_type": "Bearer"
}
Important

Access tokens expire in 24 hours. If your requests unexpectedly return a response with status 401 Unauthorized, request a new access token by repeating this POST request.

We recommend that you cache the access token for 24 hours to avoid repeating this POST request while the access token is still valid.

You can now start making REST API requests. You must include the access token in the request header of every REST API request. For example:

curl -X GET '<baseURL>/v2/...' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json'
If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use