DocsAPI referenceClient tokens
Revoke an end user's client tokens
Revokes every chain with a token of subject: for a user you ban or sign out.
POST /v1/client-tokens/revoke
Needs an API key: Authorization: Bearer $VIDEXO_API_KEY.
Body RevokeClientTokensRequest
| Name | Type | Description |
|---|---|---|
subject required | string | Your own opaque id of the end user (never an email): stored, shown in your logs and used to revoke their tokens at once. |
Request
bash
curl -X POST "$VIDEXO_API_URL/v1/client-tokens/revoke" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"subject": "user_8f2c"
}'Copy failed. The text is selected; copy it with your keyboard.
JavaScript
const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/client-tokens/revoke`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"subject": "user_8f2c"
}),
});
const answer = await response.json();Copy failed. The text is selected; copy it with your keyboard.
Response
200 JSON
{
"revoked": 2
}Copy failed. The text is selected; copy it with your keyboard.
Responses
| Status | Body | When |
|---|---|---|
| 200 | RevokedClientTokens | How many tokens were revoked. |
| 400 | Problem | invalid_request |
| 401 | Problem | authentication_failed (missing_api_key, invalid_api_key, api_key_revoked, api_key_expired) |
| 403 | Problem | permission_denied (token_scope): a client token cannot call this route |
| 429 | Problem | rate_limited, with Retry-After in seconds |