Skip to content

Exchange auth code for user's access and refresh token
experimental

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.

This endpoint is currently in its Beta stage.

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
  • 401
  • 403
  • 429

Response (200)

{
"access_token": "lorem",
"refresh_token": "lorem",
"expires_in": -9007199254740991,
"token_type": "Bearer"
}
{
"type": "object",
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"description": "The `urn:ietf:params:oauth:grant-type:jwt-bearer` grant type issues access tokens only, no refresh token is returned and the token cannot be revoked via `/v1/oauth/revoke`.",
"type": "string"
},
"expires_in": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"token_type": {
"type": "string",
"enum": [
"Bearer"
]
}
},
"required": [
"access_token",
"expires_in",
"token_type"
]
}