Provide a human-readable label for your API token, and click Create Token.
Cloud Platform displays an API Key and API secret.
To authenticate API v3 requests, you must include the access_token string in the HTTP headers as a Bearer token.
Example Header:Generating an Access Token
After you obtain the credentials, you must exchange the credentials for an access token. Use the standard OAuth 2.0 client credentials flow to exchange the credentials.
Make an HTTP POST request to Acquia token endpoint. You must format the request body as application/x-www-form-urlencoded and pass the API Key and API secret.
Example cURL Request:
curl -X POST "https://accounts.acquia.com/api/auth/oauth/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET"If the credentials are valid, the endpoint returns a JSON response that contains the temporary access token:
{
"access_token": "accesstoken",
"token_type": "Bearer",
"expires_in": 300
}
Authorization: Bearer <your_access_token>For security purposes, the access token expires exactly 300 seconds after Acquia ID generates the token.
Do not generate a new token for every individual API v3 call. Reuse the valid token until the token expires.
After the token expires, API requests fail with a 401 Unauthorized error. You must repeat the POST request to generate a fresh token before you make further API calls.
For more information, refer to Acquia Cloud Platform API (3.0.0).
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.