---
title: "invalid_chat_token: what it means and how to fix it · Hypamoon"
description: "HTTP 401. A /api/v1/public route of the chat widget got no public chat token, one that does not look like hm_pub_..., or one we do not know."
url: https://hypamoon.com/docs/errors/invalid_chat_token
---

**Start for free.** [Sign up](https://app.hypamoon.com/?mode=signup&utm_source=docs&utm_campaign=banner) without a card and connect your chat, or create a test key for the API. Going live with something real asks for a quick check of your company first.

[Errors](https://hypamoon.com/docs/errors)

# invalid\_chat\_token

**Status**\
401

**Type**\
`https://hypamoon.com/docs/errors/invalid_chat_token`

A `/api/v1/public` route of the chat widget got no public chat token, one that does not look like `hm_pub_...` or `hm_pubtest_...`, or one we do not know. Copy the `embed_code` of the token again from the portal or from `GET /api/v1/chat-tokens`. A `hm_pubtest_` token belongs to the test project and a `hm_pub_` token to the live one. Never put your API key (`hm_live_`, `hm_test_`) in a web page instead: it is a server-side secret.

Hypamoon is the infrastructure your chat or agent builds on for a business. Hypamoon API, version 1.[hypamoon.com](https://hypamoon.com/)
