Telegram
One hlix bot serves every workspace, and a chat joins yours by redeeming a short-lived link code. Once linked, messages in that chat reach the same chat agent the dashboard talks to, with your workspace’s projects, models and tools.
What it does
Section titled “What it does”| Capability | State |
|---|---|
/link <code> binds a chat to a workspace |
Works |
| Free-text message → chat agent, with its full toolbelt | Works |
| Thread context — recent chat messages sent with the request | Works, capped at 10 messages |
| Typing indicator while the agent works | Works, best-effort |
| Webhook request verification | Works — TELEGRAM_WEBHOOK_SECRET_TOKEN, checked by the adapter |
| A message from an unlinked chat | Politely refused, naming the link flow |
| Mapping a Telegram account to a hlix user | Not implemented. The chat’s workspace membership is the whole authorization |
Every message is recorded in the audit log as integration.channel.dispatched, with the Telegram user id and name on the row — so the trail names a human even though no hlix session exists for them.
Prerequisites
Section titled “Prerequisites”- A hlix workspace, and agency
owneroradmin— minting a link code is workspace administration - The deployment configured with the hlix bot (operator work, below)
Link a chat
Section titled “Link a chat”-
Generate a code in the dashboard under Integrations → Telegram, or directly:
Terminal window curl -X POST https://server.hlix.ai/v1/api/integrations/telegram/link-code \-H "X-Organization-Id: $HLIX_ORG" \-H "Authorization: Bearer $HLIX_TOKEN"{"code": "K7M2PQ9XTVA3JHNR4B0C","expiresAt": "2026-08-09T12:15:00.000Z","command": "/link K7M2PQ9XTVA3JHNR4B0C","botUsername": "hlix_bot"}The response is the only copy of the code that will ever exist — the database stores a SHA-256 of it, not the code.
-
Send it to the bot, in a direct message or in a group the bot has joined:
/link K7M2PQ9XTVA3JHNR4B0CDashes, spaces and lower case are all accepted.
-
Confirm. The bot replies:
This chat is now linked to your hlix workspace. Ask me anything — I can list projects, create tasks and run cycles. -
Talk to it. Anything that is not a command goes to the chat agent.
Who can act through a linked chat
Section titled “Who can act through a linked chat”Everyone in that chat, with the workspace’s full agent toolbelt — which can create tasks and execute cycles. hlix does not map Telegram accounts to hlix users, so the chat’s membership is the access boundary, exactly as the chat’s membership is on Telegram’s side.
Operator configuration
Section titled “Operator configuration”This part is deployment-wide, not per workspace.
-
Create the bot with Telegram’s @BotFather and copy its token.
-
Set the environment, all three:
TELEGRAM_BOT_TOKEN # from @BotFatherTELEGRAM_WEBHOOK_SECRET_TOKEN # any high-entropy string you chooseTELEGRAM_BOT_USERNAME # e.g. hlix_bot, so /link@hlix_bot resolvesWithout
TELEGRAM_WEBHOOK_SECRET_TOKENthe platform reports Telegram as not configured and refuses the webhook. That is deliberate: the adapter accepts every POST when no secret token is set, and an unverified endpoint is one anyone can deliver updates to. -
Register the webhook with Telegram, passing the same secret:
Terminal window curl -X POST "https://api.telegram.org/bot$TELEGRAM_BOT_TOKEN/setWebhook" \-d "url=https://server.hlix.ai/webhooks/channels/telegram" \-d "secret_token=$TELEGRAM_WEBHOOK_SECRET_TOKEN" -
Verify by sending
/linkwith no code. The bot should answer with the instructions, which proves both delivery and verification.
Security
Section titled “Security”Every inbound request carries X-Telegram-Bot-Api-Secret-Token, compared in constant time against TELEGRAM_WEBHOOK_SECRET_TOKEN; a mismatch is a 401 before anything else happens. The workspace is derived server-side from the chat id, never from anything in the request body — an unrecognised chat resolves to no workspace and is refused rather than defaulted.
If it does not respond
Section titled “If it does not respond”This chat isn't linked to a hlix workspace yet.— the chat has no live installation. Generate a code and send/link <code>.That link code is not valid.— unknown, already spent, or expired. All three give the same answer on purpose, so redemption cannot be used to discover which codes exist.403—admin onlyon the link-code endpoint. Minting isowner/adminwork.503—Telegram is not configured on this server— the deployment is missingTELEGRAM_BOT_TOKENorTELEGRAM_WEBHOOK_SECRET_TOKEN. An operator fix, not a user one.401 Invalid secret token— Telegram is sending a different secret than the backend holds. Re-runsetWebhookwith the value currently in the environment.- No reply at all — Telegram is not delivering. Check
getWebhookInfofor the registered URL and itslast_error_message.