/v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokensAuthRevoke a recipient's tokens
Every recipient token minted for this recipient so far stops working on its next call (`401 RECIPIENT_TOKEN_INVALID`), open real-time streams included. Tokens you mint afterwards work. Use it when the user signs out everywhere or you suspect a token leaked. Calling it again is harmless.
Path parameters
workspace_id*string · uuidId of the workspace.
external_id*stringYour user id for the recipient (URL-encoded): 1-255 of `A-Z a-z 0-9 . _ : @ | -`.
Response · 204
Revoked.
Example
Request
POST https://api.notify.productcraft.co/v1/workspaces/{workspace_id}/recipients/{external_id}/revoke-tokens
Authorization: Bearer YOUR_TOKENimport { Notify } from "@productcraft/notify";
// Reads PRODUCTCRAFT_API_KEY and PRODUCTCRAFT_WORKSPACE_ID from the environment;
// client routes take a recipient token: notify.client({ token })
const notify = new Notify();
await notify.recipients.revokeTokens("user_123");notify.recipients.revokeTokens(externalId, options?): void