curl --request POST \
--url https://{host}/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=3c7a9e1d-5b24-4f83-9a06-8d1e2f4b7c50{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9…",
"refresh_token": "def50200f1e3…"
}{
"error": "invalid_grant",
"error_description": "<string>",
"hint": "<string>",
"message": "<string>"
}{
"error": "invalid_grant",
"error_description": "<string>",
"hint": "<string>",
"message": "<string>"
}Authentication
Get access token
Scope: none — this is where scopes are asked for.
Standard OAuth 2.0, form-encoded as the specification requires. Send your client credentials in the body: every client we hand out to a partner or a seller has a secret, and every grant here asks for it.
POST
/
oauth
/
token
curl --request POST \
--url https://{host}/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=3c7a9e1d-5b24-4f83-9a06-8d1e2f4b7c50{
"token_type": "Bearer",
"expires_in": 3600,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9…",
"refresh_token": "def50200f1e3…"
}{
"error": "invalid_grant",
"error_description": "<string>",
"hint": "<string>",
"message": "<string>"
}{
"error": "invalid_grant",
"error_description": "<string>",
"hint": "<string>",
"message": "<string>"
}Body
application/x-www-form-urlencoded
One form, three grants. grant_type decides which of the other fields matter,
and the examples above fill in each one — pick the grant you are using rather
than working it out from this list.
| Grant | Also send |
|---|---|
client_credentials | client_secret, scope |
authorization_code | client_secret, redirect_uri, code, code_verifier |
refresh_token | client_secret, refresh_token |