Acquia Source uses OAuth 2.0 for API authentication, providing secure access while enabling different authentication flows for various use cases.
An API client represents an application that will be communicating with your Acquia Source site. The CMS provides a default API client for accessing APIs. However, administrators may create additional clients for different purposes, such as separate clients for a mobile app and a Next.js app.
Each client has:
Use the following steps to create a new API client:
OAuth 2.0 supports different grant types for different scenarios. Acquia Source implements following common grant types:
This grant type is best for applications where a user is present and needs to authorize access to their account.
The authorization code flow involves:
Example request:
# Step 1: Redirect user to authorization URL https://your-site.com/oauth/authorize? client_id=YOUR_CLIENT_ID& redirect_uri=YOUR_REDIRECT_URI& response_type=code& scope=content:read user:profile # Step 2: Exchange code for token (server-to-server) POST https://your-site.com/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=authorization_code& code=AUTHORIZATION_CODE& client_id=YOUR_CLIENT_ID& client_secret=YOUR_CLIENT_SECRET& redirect_uri=YOUR_REDIRECT_URI
This grant type is best for server-to-server communication where no user context is required.
The client credentials flow:
Example request:
POST https://your-site.com/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=client_credentials& client_id=YOUR_CLIENT_ID& client_secret=YOUR_CLIENT_SECRET& scope=content:read content:write
This grant type is used to obtain a new access token when the current one expires.
Refresh tokens:
Example request:
POST https://your-site.com/oauth/token Content-Type: application/x-www-form-urlencoded grant_type=refresh_token& refresh_token=YOUR_REFRESH_TOKEN& client_id=YOUR_CLIENT_ID& client_secret=YOUR_CLIENT_SECRET
If this content did not answer your questions, try searching or contacting our support team for further assistance.
Fri Aug 08 2025 12:03:14 GMT+0000 (Coordinated Universal Time)