Request Access Token
Auth Endpoints
Request Access Token
Obtain a new access token using a refresh token
POST
Request Access Token
Exchanges a valid refresh token for a new access token and a new refresh token. This endpoint implements refresh token rotation: every successful call revokes the current refresh token and issues a replacement. Reusing a revoked refresh token is detected as a potential replay attack and results in the entire token family being invalidated.
Body Parameters
string
The refresh token JWT. If omitted or
null, the server returns 200 with
{ user: null, accessToken: null } — indicating no active session. The
success and refreshToken fields are absent in this case.Response
When a valid refresh token is provided, the response is:boolean
true when a valid refresh token was provided and a new session was issued.
This field is absent when no refresh token was submitted.string | null
New short-lived JWT access token. Expires in 30 minutes.
null if no refresh
token was provided.string
New long-lived JWT refresh token (rotated). Expires in 30 days. This field is
absent when no refresh token was provided.
object | null
The authenticated user’s full profile, or
null if no refresh token was
provided.Token Rotation and Reuse Detection
Each call to this endpoint revokes the submitted refresh token and issues a new one. If the same refresh token is submitted again after being revoked:- Within 30 seconds of revocation (grace period): The server returns the successor token to handle concurrent requests gracefully.
- After 30 seconds: The entire token family is destroyed and the user must sign in again.
Error Responses
Project Mismatch — 403
Project Mismatch — 403
Token Not Recognized — 403
Token Not Recognized — 403
Token Reuse Detected — 401
Token Reuse Detected — 401
Token Expired or Malformed — 403
Token Expired or Malformed — 403
User Not Found — 403
User Not Found — 403
See Also
useAuthhook —requestNewAccessToken- Authentication overview

