First-request guide for Generate an access token.
Generate an access token
Generate an access token
Overview
This endpoint issues an OAuth2 bearer token for authenticating with Demandbase APIs.
Quickstart
Follow these two steps to make a request and recognize a successful response.
Make a request
curl --request POST \
--url https://uapi.demandbase.com/auth/v1/token \
--header "Authorization: Bearer $DB_API_KEY" \
--header "Content-Type: application/json" \
--data '{"grantType":"client_credentials","clientId":"123abc","clientSecret":"456def"}'Read the response
{
"accessToken": "example",
"tokenType": "bearer",
"expiresIn": 28800
}Request anatomy
Build the request from the method, path, parameters, and payload described below.
Parameters
This endpoint does not define additional parameters.
Request body
No fields are defined for this payload.
Response anatomy
The endpoint returns 200 for the documented success case. Successful token response
The response schema does not enumerate fields; inspect the example response and status code.
Rules
- Use
POSTwith the path/auth/v1/token. - Required inputs: No parameters are marked required in the published schema..
- Authenticate every request with a valid Demandbase access token.
- Send the request body as
application/json.
Filters
This endpoint has no additional filters or parameters beyond its authentication requirements.
Errors
Handle non-success responses explicitly so your integration can report actionable failures.
| Status | Meaning |
|---|---|
400 | Invalid request (missing or incorrect parameters) |