OAuth2 token endpoint

​

Exchanges an authorization code for an access/refresh token pair (grant_type: authorization_code) or refreshes an expired access token (grant_type: refresh_token). Returns access_token, token_type: Bearer, expires_in (seconds), and refresh_token.

Body

required
application/json
  • OAuth2 client ID

  • OAuth2 client secret

  • Grant type

  • Authorization code (required for authorization_code grant)

  • Redirect URI (required for authorization_code grant)

  • Refresh token (required for refresh_token grant)

Responses

  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/auth/oauth/token
curl https://test.boost.space/api/auth/oauth/token \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "grant_type": "authorization_code",
  "client_id": "",
  "client_secret": "",
  "code": "",
  "redirect_uri": "",
  "refresh_token": ""
}'
{
  "access_token": "string",
  "token_type": "Bearer",
  "expires_in": 1,
  "refresh_token": "string",
  "scope": "string"
}