O Auth

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 Body

application/json

client_id*string

The client id of the app requesting authorization.

client_secret*string

The secret token of your app.

code*string

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

grant_type*string

When generating a new token use authorization_code.

Default"authorization_code"
state*string

Same as the state you specified earlier.

Response Body

application/json

application/json

curl -X POST "https://example.com/oauth/token" \  -H "Content-Type: application/json" \  -d '{    "state": "900e06e2",    "code": "1b0d28d90c86c141",    "grant_type": "authorization_code",    "client_id": "cc91c61d00f8bb2ece1428035716b",    "client_secret": "1d14434088507ffa390e6f5528465"  }'
{  "access_token": "NWNiOTMxOGFkOGVjMDhhNTAxZN2NkNjgxMjMwOWJiYTEzZTBmZGUzMjMThhMzYyMzc=",  "token_type": "Bearer",  "refresh_token": "hNTI2MTFmM2VmZDQxZTZjOWRmZmFjZmVmMGMyNGFjMzI2MGI5YzgzNmE3",  "expires_in": 86400,  "state": "900e06e2"}