OAuth Token Generate

post/oauth/token

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

Request
Request Body schema: application/json
client_id
required
string

The client id of the app requesting authorization.

client_secret
required
string

The secret token of your app.

code
required
string

The code passed to your callback when the user granted access.

state
required
string

Same as the state you specified earlier.

grant_type
required
string
Default: "authorization_code"

When generating a new token use authorization_code.

Responses
200

successful operation

4XX

failed_operation

Request samples
application/json
{
  • "state": "900e06e2",
  • "code": "1b0d28d90c86c141",
  • "grant_type": "authorization_code",
  • "client_id": "cc91c61d00f8bb2ece1428035716b",
  • "client_secret": "1d14434088507ffa390e6f5528465"
}
Response samples
application/json
{
  • "access_token": "NWNiOTMxOGFkOGVjMDhhNTAxZN2NkNjgxMjMwOWJiYTEzZTBmZGUzMjMThhMzYyMzc=",
  • "token_type": "Bearer",
  • "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",
  • "expires_in": 86400,
  • "state": "900e06e2"
}