OAuth
Issue an access token
Exchanges client_credentials, an authorization_code with PKCE or a single-use refresh_token for an opaque token valid 3600 seconds for one Workspace.
Body
application/x-www-form-urlencoded, application/json
grant_typestringrequiredThe grant to exchange:
client_credentials,authorization_codeorrefresh_tokenAllowed values:
client_credentialsauthorization_coderefresh_tokenclient_idstringrequiredIdentifier of the client application
client_secretstringSecret of a confidential client (
client_secret_post), or in theAuthorization: Basicheader (client_secret_basic), never both; none for a public clientscopestringRequested scopes, separated by a space; absent: all those of the grant
workspace_idstringThe Workspace the token acts on: required when the application holds several under
client_credentials, optional when it holds onecodestringauthorization_code: the code received on the redirect addresscode_verifierstringauthorization_code: the PKCE verifier (RFC 7636)redirect_uristringauthorization_code: the same redirect address as at authorizationrefresh_tokenstringrefresh_token: the refresh token, single use
Response
200application/json
The access token, with a refresh_token only if offline_access was granted.
access_tokenstringrequiredThe opaque access token
token_typestringrequiredAlways
BearerAllowed values:
Bearerexpires_innumberrequiredValidity in seconds
scopestringrequiredThe granted scopes, separated by a space
refresh_tokenstringauthorization_codeandrefresh_tokenonly, whenoffline_accesswas granted: single use, it rotates on every exchange
400
invalid_request, invalid_grant, unsupported_grant_type, invalid_scope or unauthorized_client.
401
invalid_client: unknown client, wrong or missing secret, or revoked application.