Developers

OAuth

Markdown

Issue and refresh tokens

Exchanges an authorization code or a refresh token for a new token pair. Server-side only, with Basic authentication.

POST/oauth/token

Request body

grant_typeobjectrequired
authorization_code refresh_token
codestring
redirect_uristring (uri)
code_verifierstring
refresh_tokenstring

Response

access_tokenstringrequired
Valid for 900 seconds.
refresh_tokenstringrequired
Valid for 30 days, and replaced on every refresh.
token_typeobjectrequired
expires_inobjectrequired
scopestringrequired
Granted scopes, space-separated.
store_idstring (uuid)required
installation_idstring (uuid)required
installation_generationinteger
grant_revisioninteger
operation_idstring (uuid)

Errors

HTTPCodeMeaning
401INVALID_CLIENTClient authentication failed.
400PKCE_MISMATCHcode_verifier does not match.
400INVALID_CODEThe authorization code expired or is invalid.
400REFRESH_ALREADY_USEDThe refresh token was already used.
400TOKEN_REUSE_DETECTEDResent after success; tokens were revoked.
409RESULT_UNAVAILABLE_REAUTHORIZEThe result was lost; recover, then authorize again.

Shared codes are listed in Errors.

    ↑↓ moveEnter openEsc close