Slack error token_revoked: Token has been revoked
Last verified against Slack API reference - chat.postMessage errors
Authentication token is for a deleted user or workspace or the app has been removed when using a user token.What error token_revoked means
The token used to be valid and is not anymore. Slack's reference description covers the ways that happens: the token "is for a deleted user or workspace or the app has been removed when using a user token." In practice token_revoked is the error you meet the morning after somebody touched the app: uninstalled it from the workspace, removed it from one workspace of an Enterprise Grid org, rotated its credentials, or deactivated the user whose xoxp- token your integration was quietly depending on.
The crucial property is that revocation is terminal for that token but not for the integration. The app can be reinstalled and a fresh token issued; nothing about your code needs to change. That makes the correct handling very different from a content error: do not retry (every retry will fail identically), do not back off (time fixes nothing), and do not alert as if the code were broken. Record the credential as dead, stop the queues that use it, and route to whatever re-authorization flow you have — for a single-workspace internal app that is usually a human clicking "Reinstall to workspace" under OAuth & Permissions and updating one secret.
A subtle trap for multi-workspace apps: uninstall does not announce itself in your API responses until you next call the API. If you only send messages weekly, you can be revoked for six days without knowing. Slack solves this with events — tokens_revoked tells you which tokens died, and app_uninstalled announces removal — but only if you subscribed to them and your event endpoint is healthy.
In the SDKs this is an ordinary platform error: @slack/web-api rejects with ErrorCode.PlatformError and error.data.error === "token_revoked"; slack_sdk raises SlackApiError with the same string in e.response["error"]. Neither treats it as retryable, and neither should you. Distinguish it from token_expired, which is specific to short-lived tokens under token rotation and is fixed with the refresh token rather than a reinstall, and from account_inactive, where the owning account is gone.
What it looks like
{"ok": false, "error": "token_revoked"}Why it happens
- The app was uninstalled from the workspace (or removed from one workspace of an org-wide install).
- A user-token install's user revoked the app's authorization or was deactivated.
- The app's tokens were rotated or reissued, invalidating stored older tokens.
- An admin removed or restricted the app under workspace app management.
- Your database still holds the token from a previous install after a reinstall issued a new one.
How to fix Slack error token_revoked
- 1Confirm the state with auth.test: a revoked token fails consistently from any network, unlike IP-conditional invalid_auth.
- 2Check the app's Manage Distribution / install state, or ask a workspace admin whether the app is still installed.
- 3Reinstall the app to the workspace and store the freshly issued token from the oauth.v2.access response (or the OAuth & Permissions page for internal apps).
- 4Restart or refresh any long-lived worker that caches the token in memory.
- 5Mark the old credential terminal so schedulers and retry queues stop using it.
- 6Subscribe to the tokens_revoked and app_uninstalled events so future revocations update your credential store immediately.
How to stop it recurring
Treat Slack tokens as revocable at any moment: key every stored credential by team ID, watch tokens_revoked, and build the "reconnect your Slack" path before you need it. For internal apps, document that reinstalling issues a new token and that the deployment secret must be updated in the same change. A revoked token discovered at send time should degrade into a queued re-auth task, not a crash loop — the pattern is covered in Slack bot not responding.
Official reference: Slack API reference - chat.postMessage errors. See all Slack error codes or the Slack limits and quotas.
Related codes
- account_inactive: Token for a deleted user or workspaceAuthentication token is for a deleted user or workspace when using a bot token.
- token_expired: Token has expiredAuthentication token has expired
- invalid_auth: Authentication cannot be validatedSome aspect of authentication cannot be validated. Either the provided token…
- not_authed: No authentication token providedNo authentication token provided.
Error token_revoked - quick answers
What does Slack error token_revoked mean?
The token used to be valid and is not anymore. Slack's reference description covers the ways that happens: the token "is for a deleted user or workspace or the app has been removed when using a user token." In practice token_revoked is the error you meet the morning after somebody touched the app: uninstalled it from the workspace, removed it from one workspace of an Enterprise Grid org, rotated its credentials, or d
How do I fix Slack error token_revoked?
1. Confirm the state with auth.test: a revoked token fails consistently from any network, unlike IP-conditional invalid_auth. 2. Check the app's Manage Distribution / install state, or ask a workspace admin whether the app is still installed. 3. Reinstall the app to the workspace and store the freshly issued token from the oauth.v2.access response (or the OAuth & Permissions page for internal apps). 4. Restart or refresh any long-lived worker that caches the token in…
Should I retry after error token_revoked?
No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.
Stop debugging Slack by hand
Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.