OAuth Token Generate

View as Markdown
Once you have retrieved the code from the user callback, you will need to exchange it for an access token via a backend call.

Authentication

AuthorizationBasic

Basic authentication of the form Basic <username:password>.

OR
AuthorizationBearer

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

Request

This endpoint expects an object.
client_idstringRequired
The client id of the app requesting authorization.
client_secretstringRequired
The secret token of your app.
codestringRequired
The code passed to your callback when the user granted access.
grant_typestringRequiredDefaults to authorization_code

When generating a new token use authorization_code.

statestringRequired
Same as the state you specified earlier.

Response headers

X-RateLimit-Limitinteger
The maximum number of requests per hour that you can make.
X-RateLimit-Remaininginteger
The number of requests remaining in the current rate limit window.
X-Ratelimit-Resetinteger
The Unix time at which the rate limit will reset to its maximum.

Response

successful operation
access_tokenstring or null
token_typestring or null
refresh_tokenstring or null
expires_ininteger or null

Number of seconds until the access_token expires. Uses epoch time.

statestring or null

Errors