Skip to navigation

Get Bearer Token

View as Markdown

Obtain an OAuth 2.0 access token using the client credentials grant. Send client_id, client_secret, and grant_type=client_credentials as application/x-www-form-urlencoded data. See Authentication.

Authentication

AuthorizationBearer

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

Request

OAuth 2.0 client credentials request body (form URL-encoded). Use the Connected App client ID and client secret from the Developer Portal.

grant_typeenumRequired

Must be client_credentials for this flow.

Allowed values:
client_idstringRequired
Connected App client ID from the Developer Portal.
client_secretstringRequired
Connected App client secret from the Developer Portal.

Response

Successful response
access_tokenstring

Bearer token value sent as Authorization: Bearer <access_token>.

token_typeenum

Token type; Bearer for this flow.

Allowed values:
expires_ininteger>=1

Lifetime of the access token in seconds (typically 3600).

Errors

401
Unauthorized Error