Retrieve access token
Last update: December 6, 2024
- Topics:
- Authentication
The content on this page is provided for information purposes only. Usage of this API requires a current license from Adobe. No unauthorized use is permitted.
Dynamic Client Registration API implementation is bounded by the Throttling mechanism documentation.
Request
HTTP
path
/o/client/token
method
POST
Body Parameters
client_id
The client application identifier string.
For more information about how to obtain the client identifier string, refer to the Retrieve client credentials API documentation.
For more information about how to obtain the client identifier string, refer to the Retrieve client credentials API documentation.
required
client_secret
The client application secret string.
For more information about how to obtain the client secret string, refer to the Retrieve client credentials API documentation.
For more information about how to obtain the client secret string, refer to the Retrieve client credentials API documentation.
required
grant_type
The grant type string (e.g., "client_credentials") that the client application can use for the client token endpoint.
For more information about how to obtain the grant type string, refer to the Retrieve client credentials API documentation.
For more information about how to obtain the grant type string, refer to the Retrieve client credentials API documentation.
required
Headers
Content-Type
The accepted media type for the resources being sent.
It must be application/x-www-form-urlencoded.
It must be application/x-www-form-urlencoded.
required
X-Device-Info
The generation of the device information payload is described in the X-Device-Info documentation.
It is strongly recommended to always use it when the application's device platform allows for the explicit provision of valid values.
When provided, the Adobe Pass Authentication backend will merge explicitly set values with extracted values implicitly (by default).
When not provided, the Adobe Pass Authentication backend will use extracted values implicitly (by default).
It is strongly recommended to always use it when the application's device platform allows for the explicit provision of valid values.
When provided, the Adobe Pass Authentication backend will merge explicitly set values with extracted values implicitly (by default).
When not provided, the Adobe Pass Authentication backend will use extracted values implicitly (by default).
required
Accept
The media type accepted by the client application.
If specified, it must be application/json.
If specified, it must be application/json.
optional
User-Agent
The user agent of the client application.
optional
Response
Success
Headers
Status
201
required
Content-Type
application/json
required
Body
JSON object having the following attributes:
Attribute
id
The opaque identifier that can be used for tracking user activity.
required
access_token
The access token value the client application must use for the Authorization header.
required
created_at
The time at which the access token was issued.
required
expires_in
The time in seconds until the access token expires.
required
token_type
The token type (e.g., "bearer").
required
required
Error
Headers
Status
400
required
Content-Type
application/json
required
Body
error
The possible values are:
Value
invalid_request
The request is invalid due to one of the following reasons:
- The request misses a required parameter.
- The request includes an unsupported parameter value (other than grant type).
- The request repeats a parameter.
- The request includes multiple credentials.
- The request utilizes more than one mechanism for authenticating the client.
- The request is malformed.
invalid_client
The client credentials are invalid, the client needs to obtain new client credentials and try again. For more details refer to the Retrieve client credentials API documentation.
unauthorized_client
The grant type used is invalid.
required
Samples
Retrieve access token
Request
POST /o/client/token HTTP/1.1
X-Device-Info: ewoJInByaW1hcnlIYXJkd2FyZVR5cGUiOiAiU2V0VG9wQm94IiwKCSJtb2RlbCI6ICJUViA1dGggR2VuIiwKCSJtYW51ZmFjdHVyZXIiOiAiQXBwbGUiLAoJIm9zTmFtZSI6ICJ0dk9TIgoJIm9zVmVuZG9yIjogIkFwcGxlIiwKCSJvc1ZlcnNpb24iOiAiMTEuMCIKfQ==
Content-Type: application/x-www-form-urlencoded
Accept: application/json
User-Agent: Mozilla/5.0 (Apple TV; U; CPU AppleTV5,3 OS 11.0 like Mac OS X; en_US)
Body:
client_id=s6BhdRkqt3&client_secret=t7AkePiru4&grant_type=client_credentials
Response - Success
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
{
"id": "a932f8f0-210a-41a4-b2a8-377751f6b76f",
"access_token": "2YotnFZFEjr1zCsicMWpAA",
"created_at": 1723227212,
"expires_in": 86400,
"token_type": "bearer"
}
Response - Error
HTTP/1.1 400 Bad Request
Content-Type: application/json;charset=UTF-8
{ "error": "invalid_request" }
recommendation-more-help
3f5e655c-af63-48cc-9769-2b6803cc5f4b