auth

Exchange credentials for an access token

[cloud-only] Exchanges authentication credentials (e.g. an authorization code) for an access token.

post/api/auth/token

Request body

grant_type'authorization_code' | 'refresh_token' required

OAuth2 grant type

codestring

Authorization code (for authorization_code grant)

refresh_tokenstring

Refresh token (for refresh_token grant)

redirect_uristring uri

Redirect URI used in the authorization request

Response

Token response

tokenstring required

Cloud JWT token

expires_atstring date-time required

Token expiration time (RFC 3339)

role'owner' | 'member' required

User's role in the workspace

permissionsstring[] required

Permission strings for the role

Example response

{
  "workspace": {
    "id": "w-a1b2c3d4-5678-90ab-cdef-1234567890ab",
    "name": "My Team"
  },
  "permissions": [
    "owner:*"
  ]
}

Changes