invalid_token
Access not valid
| Code | invalid_token |
|---|---|
| HTTP status | 401 |
| Responsible | caller: The caller (the agent or the person behind it) |
| Retryable | no (the same request will get the same answer) |
| Where it appears | As an HTTP response with this status, before any tool runs. |
| Charged | Nothing. No error uses quota or charges money. |
What it means
The request carried an access key or a sign-in that Zando does not accept: mistyped, revoked or expired.
What an agent should do
- Do not loop on the same key: it will be refused again.
- Tell the user the key or sign-in is not valid. An access key cannot be renewed by the agent itself.
The error's next_actions come first: they are written for this exact error (a call to send
instead, something to tell the user, this page). Tell the user the error's detail: its first
sentence is written to be read as is.
What a person should do
Check the key (it starts with zdk_) for a typo or a missing part, give the assistant a valid key, or sign it in again.
Example
The error object is the same on every channel; only the order of next_actions follows the
channel. Ids, times and values below are examples.
As an HTTP response (application/problem+json)
HTTP 401
Content-Type: application/problem+json
Cache-Control: no-store, no-transform
Zando-Origin: zando
Zando-Contract-Version: 1.6
WWW-Authenticate: Bearer error="invalid_token", resource_metadata="https://mcp.zando.ai/.well-known/oauth-protected-resource/mcp", scope="agent", error_description="The access key or sign-in of this assistant is not valid for Zando; its owner must give it a valid key or sign it in again."
{
"type": "https://zando.ai/docs/errors/invalid_token",
"code": "invalid_token",
"title": "Access not valid",
"status": 401,
"detail": "The access key or sign-in of this assistant is not valid for Zando; its owner must give it a valid key or sign it in again.",
"origin": "zando",
"responsible": "caller",
"retryable": false,
"retry_after_s": null,
"param": null,
"allowed": null,
"call_id": null,
"chain_id": null,
"charged_micros": 0,
"currency": "usd",
"next_actions": [
{
"type": "docs",
"url": "https://zando.ai/docs/errors/invalid_token"
}
]
}