Skip to content
Revoke Current Access Token

Revoke Current Access Token

Revokes an access token and refresh token associated with a client or user.

Endpoint

/api/v1/tokens/current/revoke

Method

POST

Headers

HeaderRequiredDescription
Content-TypeYesapplication/json
AuthorizationNoOptional Bearer access token to revoke: Bearer <access_token>

Request Body

FieldTypeRequiredDescription
client_idstringYesClient ID
refresh_tokenstringYesRefresh token to revoke

Examples

curl --request POST \
  --url https://auth.roled.id/api/v1/tokens/current/revoke \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJo...' \
  --data '{
    "client_id": "2JRYkzSeBV89itqcU9mraF",
    "refresh_token": "M8MmHrhqzcBgUwCQ5enp4wTuRVBgi2txChS44Q3FYJGRgzX..."
}'

Error Codes

CodeHTTP StatusDescription
system_error500Internal server error