Skip to main content

Revoke Personal Access Token

Revoke a personal access token. The token will be immediately invalidated.

Quick Navigation

Endpoint

DELETE /api/v1/auth/tokens/{token_id}

Headers

HeaderRequiredDescription
AuthorizationYesBearer <access_token>

Path Parameters

ParameterTypeRequiredDescription
token_idintegerYesToken ID

Response

Success (200)

{
"success": true,
"data": {
"message": "Token revoked successfully"
},
"message": "Token revoked successfully"
}

Error (404)

{
"success": false,
"error": {
"code": "token_not_found",
"message": "Token not found"
}
}

Features

  • Token will be immediately invalidated
  • Cannot be used anymore after revocation
  • Only token owner can revoke their tokens
  • Cannot be undone

Example

curl -X DELETE "https://api.rivergen.com/api/v1/auth/tokens/1" \
-H "Authorization: Bearer <access_token>"