Skip to main content

Overview

The Tokens service handles the complete token lifecycle: exchanging authorization codes, refreshing tokens, online verification, and revocation.

Exchange

Exchange an authorization code for a grant token after the user consents.

Parameters

Response (ExchangeTokenResponse)

Refresh

Exchange a refresh token for a new grant token while the underlying grant remains active. Refresh tokens are single-use, and each successful rotation returns a new refresh token without extending ExpiresAt.
Always store and use the newest RefreshToken. If the HTTP response is lost after the server commits the rotation, retry the same previous refresh token immediately; during a five-minute (300-second) replay-recovery window, Grantex returns the already-rotated refresh token instead of rotating again while the grant remains active. After that window, once the rotated child token has been used, or after grant expiration, the previous refresh token is rejected.

Parameters

Response

Same ExchangeTokenResponse as Exchange — includes a new GrantToken and RefreshToken with the same GrantID and ExpiresAt.

Verify

Perform online token verification against the Grantex API.

Response (VerifyTokenResponse)

Revoke

Revoke a token by its JTI (token ID).
Returns nil on success (HTTP 204).

Ownership

Grantex is owned by Orchestrum Technologies LLP. Inventor and owner: Sanjeev Kumar. Ownership contact: sanjeev@orchestrum.in or mishra.sanjeev@gmail.com.
Last modified on August 29, 2026