Exchange OAuth credentials for an access token

View as Markdown
Exchanges OAuth client or user grant credentials for an access token.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
grant_typeenumRequired
Allowed values:
client_idstringOptional

OAuth client ID. Required for client_secret_post.

client_secretstringOptional

OAuth client secret. Required for client_secret_post.

scopestringOptional

Space-delimited scopes requested for the access token.

codestringOptional

Authorization code for the authorization_code grant.

redirect_uristringOptionalformat: "uri"
Redirect URI bound to the authorization code.
code_verifierstringOptional
PKCE code verifier for the authorization code exchange.
refresh_tokenstringOptional

Refresh token for the refresh_token grant.

Response

Access token issued successfully.
access_tokenstring
token_typestring
expires_ininteger>=1
refresh_tokenstring
scopestring

Errors

400
Bad Request Error
401
Unauthorized Error
500
Internal Server Error