token_revoked — Channel token was revoked
What the API returns
{
"error": {
"code": "token_revoked",
"message": "This channel token has been revoked.",
"request_id": "req_01JRQ8F4X9N2K7YB3C5V6W8H0T"
}
}Every Wapito error is this one envelope. Branch on code, which is stable; message is written for people and can be reworded; details appears only when there is something specific to say; request_id is what to quote to support.
What it means
token_revoked is an HTTP 401 error from the Wapito WhatsApp API: channel token was revoked. The response message reads “This channel token has been revoked.” It is not retryable: the same request fails again until you change it. 4 endpoints can raise it, GET /channel among them.
Why it happens
The token you presented was issued for this channel but has since been rotated or revoked, either by someone pressing rotate in the dashboard or automatically when the channel was deleted or relinked to a different phone. The old value stops working the moment the new one is shown. Wapito stores only a hash of each token, so a revoked token can never be recovered - a new one has to be issued.
How to fix token_revoked
Open the channel in the dashboard, rotate the token, and copy the new value once - it is never shown again.
Put the new token in your secret manager and restart the workers that hold it in memory.
If you did not rotate it yourself, check who else has dashboard access before you assume it was an accident.
Endpoints that raise it
Where you will meet it
- Connect a Number
Feature guide
Retry guidance
Do not retry as sent
The same request fails the same way until something changes: the body, the credential, the recipient or the state of the channel. Keep it off every retry loop, fix the cause above, and send a corrected request once.
Frequently asked questions
How long does an old token keep working after a rotation?
It does not. Rotation takes effect immediately and there is no grace window, because a grace window would defeat the point of rotating a leaked credential. Plan a short deploy that swaps the secret, and rotate at a quiet hour if your sending is continuous.
Does rotating the token disconnect the WhatsApp number?
No. The token is an API credential and the WhatsApp session is a separate thing entirely. Rotating a token leaves the linked number connected, keeps the warm-up ladder intact, and does not touch delivery of webhooks that are already configured.
Related
Try it on your own number
Create a channel, link a WhatsApp number by QR or pairing code, and call the API in a couple of minutes. The Sandbox plan is free and needs no card.