Auth
OAuth 2.1 runtime endpoints (token exchange, revoke, introspect).
RFC 6749 token endpoint. Grants: authorization_code (with PKCE) and refresh_token. Refresh tokens rotate on every use β the previous refresh_token is invalidated immediately. Request body is application/x-www-form-urlencoded, not JSON. Server-to-server integrations should use API keys, not OAuth.
Form-encoded body per RFC 6749. Two grant types supported:
authorization_codewith PKCE β for interactive auth after a user grants access.refresh_tokenβ to exchange a refresh token for a new access token. Refresh tokens rotate on every use; the old refresh token is invalidated.
Your OAuth client's ID.
Confidential clients only. Public clients (SPAs, native apps) must NOT send this; they authenticate via PKCE.
Required for authorization_code. The code you received at your redirect_uri.
Required for authorization_code. Must match the URI used in the authorization request.
Required for authorization_code with PKCE (which is required for all interactive flows). The verifier that produced the code_challenge on the authorization request.
Required for refresh_token grant.
Space-separated scopes to request. On refresh, you may request a subset of the previously granted scopes; you cannot request additional scopes.
New tokens issued.
Seconds until the access token expires.
Present on authorization_code grant and every refresh_token grant (rotated).
Space-separated actually-granted scopes.
Invalid grant, unknown client, expired/reused code, or PKCE mismatch.
Missing or invalid credentials.
POST /v3/oauth/token HTTP/1.1
Host: api.gleantap.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 174
"grant_type='authorization_code'&client_id='text'&client_secret='text'&code='text'&redirect_uri='text'&code_verifier='text'&refresh_token='text'&scope='text'"{
"access_token": "text",
"token_type": "text",
"expires_in": 1,
"refresh_token": "text",
"scope": "text"
}RFC 7009. Revokes either an access token or a refresh token. Revoking a refresh token invalidates all access tokens issued from it. Revoking an access token does NOT invalidate its refresh token.
Revoked (or the token was already invalid β the spec requires 200 either way).
No content
POST /v3/oauth/revoke HTTP/1.1
Host: api.gleantap.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 91
"token='text'&token_type_hint='access_token'&client_id='text'&client_secret='text'"Revoked (or the token was already invalid β the spec requires 200 either way).
No content
RFC 7662. Check whether a token is currently active and, if so, what it authorizes. Requires client credentials β public clients cannot introspect.
Introspection result. active: false means the token is invalid, expired, or revoked.
Per RFC 7662. active is the only guaranteed field; other fields are present when the token is valid.
Expiration timestamp (Unix seconds).
Issued-at timestamp.
The subject (user ID) for user-scoped tokens.
Missing or invalid credentials.
POST /v3/oauth/introspect HTTP/1.1
Host: api.gleantap.com
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 91
"token='text'&token_type_hint='access_token'&client_id='text'&client_secret='text'"{
"active": true,
"scope": "text",
"client_id": "text",
"username": "text",
"exp": 1,
"iat": 1,
"sub": "text",
"aud": "text",
"token_type": "access_token"
}