Authenticate with the Intent API
All Demandbase Intent API requests require a JWT Bearer token generated from an API key set with Intent API access. Use OAuth client credentials to generate an access token before making API requests.
Legacy API tokens are not supported.
Prerequisites to Authenticate with the Intent API
Before authenticating, you must:
- Generate and Manage API Key Sets.
- Grant the API key set access to the Intent API.
- Obtain the Client ID and Client Secret associated with the API key set.
Important: Intent API access includes write permissions. Any API key set with Intent API access can create and modify keyword sets, not just retrieve intent data. Review which integrations have access to these credentials.
Generate a JWT Bearer Token
Exchange your API credentials for a JWT Bearer token using the OAuth client credentials grant.
curl --request POST \
--url https://uapi.demandbase.com/auth/v1/token \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"grantType": "client_credentials",
"clientId": "YOUR_CLIENT_ID",
"clientSecret": "YOUR_CLIENT_SECRET"
}'Replace YOUR_CLIENT_ID and YOUR_CLIENT_SECRET with your API key set credentials.
Include Required Headers in Intent API Requests
Include the following headers in each Intent API request:
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Accept: application/jsonReplace YOUR_ACCESS_TOKEN with the JWT Bearer token generated from your API credentials.
Troubleshoot Intent API Authentication Errors
The following HTTP status codes indicate authentication or permission issues.
| HTTP Status Code | Description |
|---|---|
401 Unauthorized | The JWT Bearer token is invalid or expired. Generate a new access token. |
403 Forbidden | The token lacks the required permissions. Verify that the API key set includes Intent API access. |
Important: A valid JWT Bearer token without Intent API access returns 403 Forbidden. Verify that the API key set has the required permissions before retrying the request.
Updated 4 days ago