Ir al contenido

Exchange client credentials for an access token (grant_type=client_credentials)

POST
/oauth/token
curl --request POST \
--url https://acme.gravitastec.com/api/v1/oauth/token \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data grant_type=client_credentials \
--data client_id=example \
--data client_secret=example
Media typeapplication/x-www-form-urlencoded
object
grant_type
required
string
Allowed value: client_credentials
client_id
required
string
client_secret
required
string

Token

Media typeapplication/json
object
access_token
string
token_type
string
Allowed value: Bearer
expires_in
integer

Example

{
"token_type": "Bearer",
"expires_in": 900
}

Invalid_client / unsupported_grant_type (RFC 6749)

Plan without API access (code limit_exceeded)