Skip to content
Management API Reference

[Beta] Exchange auth code for user's access and refresh token

post/v1/oauth/token

Supports authorization_code, refresh_token, and urn:ietf:params:oauth:grant-type:jwt-bearer grant types. The jwt-bearer grant type (IDJAG — identity-directed JWT assertion) is in beta and available on Team and Enterprise plans only.

Body

  • grant_type
    Optional
    enum
  • client_id
    Optional
    string
  • client_secret
    Optional
    string
  • code
    Optional
    string
  • code_verifier
    Optional
    string
  • redirect_uri
    Optional
    string
  • refresh_token
    Optional
    string
  • assertion
    Optional
    string
  • resource
    Optional
    string
  • scope
    Optional
    string

Response codes

  • 200

Response (200)

1
{
2
"access_token": "lorem",
3
"refresh_token": "lorem",
4
"expires_in": 42,
5
"token_type": "Bearer"
6
}