Skip to main content
POST
/
oauth
/
token
cURL
curl --request POST \
  --url https://sandbox.onconsul.com/v1/oauth/token \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "client_id": "<string>",
  "client_secret": "<string>",
  "grant_type": "<string>",
  "code": "<string>",
  "redirect_uri": "<string>",
  "refresh_token": "<string>"
}
'
{
  "access_token": "<string>",
  "expires_in": 123,
  "scope": "<string>",
  "token_type": "<string>",
  "refresh_token": "<string>"
}
Exchange an authorization code for an access token, or use a refresh token to obtain a new access token when the current one expires.

Authorizations

Authorization
string
header
required

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

Body

application/json
client_id
string
required
client_secret
string
required
grant_type
string
required
code
string
redirect_uri
string<uri>
refresh_token
string

Response

OK

access_token
string
required
expires_in
integer<int64>
required
scope
string
required
token_type
string
required
refresh_token
string