Revoke Token
Authentication
Revoke Token
Revoke a refresh token (logout)
POST
Revoke Token
Description
Revokes a refresh token, effectively logging out the user from that session. This should be called when a user explicitly logs out.Authentication
Requires valid JWT access token in the Authorization header. Header:Authorization: Bearer <access_token>
Request Body
The refresh token to revoke.
Optional reason for revoking the token (e.g., “User logout”, “Security concern”).
Response
Confirmation message indicating the token was successfully revoked.
Status Codes
- 200 OK: Token successfully revoked
- 401 Unauthorized: Invalid access token, invalid refresh token, or token already revoked
Example Request
cURL
Example Response
200 OK
401 Unauthorized
Usage Notes
- This endpoint requires authentication, so you must include a valid access token in the Authorization header
- Once revoked, the refresh token cannot be used to obtain new access tokens
- The
Reasonparameter is optional but recommended for audit logging