40141: Token revoked

token_revoked

A connection or request was rejected because the authentication token it used has been revoked. A revoked token is invalidated before its normal expiry and can no longer authenticate.

What you should do

Determine whether the revocation was expected.

If it was deliberate, the connection or request has been rejected as intended. Check that your auth server is also configured to refuse new tokens to that client, though. Revocation only invalidates tokens already issued, so otherwise the client can just request a fresh token and carry on.

If the revocation was unexpected, treat it as a security signal. A token is only invalidated when someone calls the token revocation API with the key that issued it, typically an admin or an automated process cutting off credentials believed to be compromised. Find out who revoked it and why, and confirm the credentials are no longer exposed, before issuing replacements.

Why it happens

Revocation invalidates a token before its normal expiry, which is distinct from a token that simply expired. A revocation request matches tokens by client ID, revocation key, or channel, but applies only to those issued before the point of revocation; a token issued afterwards, such as a renewed one, is unaffected. Revocable tokens are capped at a short lifetime so that a revocation takes full effect once the matching tokens issued beforehand have expired.

What you'll see

The error is reported with code 40141 and HTTP status 401. The message is typically token revoked.