Skip to content

Get an access token (OAuth 2.0 client credentials)

POST
/api/integrations/v1/oauth/token
curl --request POST \
--url https://app.quatlasglobal.com/api/integrations/v1/oauth/token \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data client_id=example \
--data client_secret=example \
--data grant_type=example \
--data scope=example

Form-encoded, grant_type=client_credentials. Authenticate with HTTP Basic (client_secret_basic) or the client_id and client_secret fields (client_secret_post): the client id is your key’s prefix, the secret is the key. Returns a bearer token valid for 15 minutes, for Authorization: Bearer on the other routes. Revoking the key refuses its tokens at once. A key whose “direct key allowed” setting is off works here only.

Media typeapplication/x-www-form-urlencoded
object
client_id
required

Client_secret_post only: your key’s prefix (qk_… or qk_test_…).

null | string
client_secret
required

Client_secret_post only: the key itself.

null | string
grant_type
required

Always client_credentials.

string
scope
required

Optional: the scopes wanted, space-separated; at most the key’s own. Default: all of them.

null | string
Examplegenerated
client_id=example&client_secret=example&grant_type=example&scope=example

OK

Media typeapplication/json
object
access_token
required

The bearer token for Authorization: Bearer on the Integration API.

string
expires_in
required

Seconds the token is valid for (900).

integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
scope
required

The scopes granted, space-separated.

string
token_type
required

Always Bearer.

string
Examplegenerated
{
"access_token": "example",
"expires_in": 1,
"scope": "example",
"token_type": "example"
}

Bad Request

Media typeapplication/json
object
error
required

Invalid_request, invalid_client, unsupported_grant_type or invalid_scope.

string
error_description
required
null | string
Examplegenerated
{
"error": "example",
"error_description": "example"
}

Unauthorized

Media typeapplication/json
object
error
required

Invalid_request, invalid_client, unsupported_grant_type or invalid_scope.

string
error_description
required
null | string
Examplegenerated
{
"error": "example",
"error_description": "example"
}

Too Many Requests

Media typeapplication/problem+json
object
detail
null | string
instance
null | string
status
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
title
null | string
type
null | string
Examplegenerated
{
"detail": "example",
"instance": "example",
"status": 1,
"title": "example",
"type": "example"
}