Skip to main content

Token

Exchange an authorization code for an access token and refresh token.

Method

Parameters

string
required
Either "authorization_code" or "refresh_token".
string
The authorization code. Required when grant_type is "authorization_code".
string
The redirect URI used in the authorization request.
string
The refresh token. Required when grant_type is "refresh_token".
object
External account information.
string
required
Your integration’s OAuth client ID.
string
required
Your integration’s OAuth client secret.

Response

string
The access token for making API requests.
string
Always "bearer".
string | null
The refresh token for obtaining a new access token. null when using refresh_token grant.
string
The ID of the bot user.
string
The ID of the workspace.
string | null
The name of the workspace.
string | null
The icon URL of the workspace.
object
Details about the owner of the integration.
string | null
The ID of the duplicated template, if any.

Example


Introspect

Introspect an access token to check its validity and retrieve metadata.

Method

Parameters

string
required
The access token to introspect.
string
required
Your integration’s OAuth client ID.
string
required
Your integration’s OAuth client secret.

Response

boolean
Whether the token is currently active.
string
The scopes granted by the token.
number
The timestamp when the token was issued (Unix timestamp).

Example


Revoke

Revoke an access token.

Method

Parameters

string
required
The access token to revoke.
string
required
Your integration’s OAuth client ID.
string
required
Your integration’s OAuth client secret.

Response

string
The ID of the revocation request.

Example