Revoke Current Access Token
Revokes an access token and refresh token associated with a client or user.
Endpoint
/api/v1/tokens/current/revokeMethod
POST
Headers
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/json |
Authorization | No | Optional Bearer access token to revoke: Bearer <access_token> |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | Yes | Client ID |
refresh_token | string | Yes | Refresh 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
| Code | HTTP Status | Description |
|---|---|---|
system_error | 500 | Internal server error |