Ngentix

consumer_token_invalid

Consumer token not valid for this key · HTTP 401

What causes this

The token is unknown, has expired, was minted for a different organization or environment, or names a different consumer than the one the call is for. All four return this same message deliberately — telling them apart would let anyone holding a publishable key probe which sessions and tenants exist.

How to fix it

Mint a fresh token with POST /v1/portal/sessions, using a secret key from the same environment as the publishable key the widget carries. Sandbox tokens do not work against production keys.

What the response looks like

{
  "error": {
    "code": "consumer_token_invalid",
    "status": 401,
    "message": "…",
    "hint": "…",
    "request_id": "req_…",
    "docs_url": "https://cloud.ngentix.ai/docs/errors/consumer_token_invalid"
  }
}

Quote the request_id if you contact support — it identifies your exact request in our logs.