---
title: "Telegram"
description: "Connect AiHummer to Telegram: polling or webhook, rich messages, message reactions and polls, bot-to-bot with a loop guard, and OIDC-brokered secrets."
updated: "2026-11-11"
---

**Telegram is AiHummer's production-grade, recommended first channel.** It is the
fastest way to get a working agent in front of real people: create a bot with
[@BotFather](https://t.me/BotFather), give the connector the token, and inbound
messages start flowing to the gateway.

The Telegram connector is installed from the in-product
[Marketplace](/en/v1.7/marketplace/overview-tiers/) and configured in the Admin UI.
It runs host-native and talks to the gateway over the inbound API, so it scales
and restarts independently of the turn engine.

## Connect Telegram in 6 steps

Here is the end-to-end path from zero to a bot that replies to you in Telegram. All
you need is a Telegram account and access to your AiHummer web admin UI.

1. **Create a bot with BotFather.** In Telegram open
   [@BotFather](https://t.me/BotFather), send `/newbot`, and set the bot's name and
   username. *What you'll see:* BotFather returns a **token** like `123456789:AA…` —
   this is the bot's access key, copy it.
2. **Install the Telegram connector.** In the admin UI open
   [Plugins/Marketplace](/en/v1.7/webui/marketplace/), find the Telegram connector in
   the catalog and click "Install". Wait for the card to turn "online" (an install
   progress bar is shown).
3. **Paste the token.** On the [Channels](/en/v1.7/webui/channels/) screen,
   select **Configure** on the Telegram card and fill in **Bot token**.
   **Public server address** appears only in webhook mode. Save the settings.
4. **Create an agent** (if you don't have one yet) — see
   [Agents](/en/v1.7/webui/agents/): a name and a system prompt are enough.
5. **Bind the agent to the channel.** On the [Channels](/en/v1.7/webui/channels/)
   screen, in the **"Bindings"** block, pick a **default agent** for Telegram — the
   rule "new Telegram conversations are run by agent Y". The choice saves instantly.
6. **Message the bot.** Open your bot in Telegram and send it a message. *What
   you'll see:* the agent replies in the chat, and the matching conversation appears
   on the "Sessions" screen in the admin UI.

> [!NOTE]
> By default the agent answers **only known users** (people registered in
> AiHummer). If the bot stays silent on your message — either add yourself as an
> instance user, or turn off "Answer only known users" on the
> [Channels](/en/v1.7/webui/channels/) screen.

## Why start with Telegram

Telegram has the least friction of any AiHummer channel: no carrier, no OAuth
consent screen, no app review. A bot token is enough to send and receive
messages, and the same connector covers both internal staff chats and
customer-facing bots. Because it is production-grade and fully exercised, it is
the channel we recommend you wire up first when evaluating AiHummer.

## Polling or webhook

The connector supports both ingestion modes, so it works whether or not your
gateway is reachable from the public internet.

- **Long polling** — the connector pulls updates from Telegram. No inbound port
  or TLS is required, which makes it ideal for local development and private
  networks.
- **Webhook** — Telegram pushes updates to a public HTTPS URL. Lower latency and
  better suited to production behind a reverse proxy that terminates TLS.

The connector listens on **port 8800** in a normal deployment, or **8091** for a
local run. Each inbound message is posted to the gateway URL configured in
`AIHUMMER_INBOUND_URL`, authenticated with the shared inbound secret.

## Rich messages, message reactions and polls

Beyond plain text, the Telegram channel renders **Rich Messages** — formatted
replies that map an agent's structured output onto Telegram's native message
features. It also supports **message reactions** and **polls**, so an agent can react to
a user's message or put a quick poll into a chat as part of a turn.

> [!TIP]
> Telegram is the channel identified to AiHummer as `telegram`. Use that channel
> id when you bind an agent or filter conversations by source.

## Group behavior and reactions (connector 1.0.2)

Core 1.3 pins the signed Telegram connector **1.0.2**: it handles message
reactions, passes the correct sender of button callbacks to the core and gained
group-behavior settings. On the **Channels** screen, select **Configure** on the
Telegram card. History, reactions and context are in **Advanced settings**.

| Setting | What it does |
|---|---|
| `TELEGRAM_REQUIRE_MENTION` | In groups, answer only messages that @mention the bot (off by default). |
| `TELEGRAM_GROUP_HISTORY_LIMIT` / `TELEGRAM_DM_HISTORY_LIMIT` | How many group or direct-chat messages (0–500) enter the agent’s context; `0` — follow the agent policy. |
| `TELEGRAM_GROUP_ACK_REACTION` | The emoji reaction the bot puts on a message addressed to it in a group; empty — none. |
| `TELEGRAM_FORWARD_REACTIONS` | Forward inbound user reactions to the core as events. |
| `TELEGRAM_GUEST_MODE` | Guest mode: answer in any chat, not only known users. |
| `TELEGRAM_ALLOW_BOT_TO_BOT` | Allow exchanges with other bots (with the loop guard). |
| `TELEGRAM_STREAMING` | Stream the reply while it is generated (on by default). |
| `TELEGRAM_RICH_MESSAGES` | Native rich messages (on by default). |

For the bot to see group messages at all, privacy mode must be disabled at
BotFather (`/setprivacy` → Disable) — otherwise it stays silent.

## Bot-to-bot with a loop guard

Agents can talk to other bots. To make that safe, the connector ships a
**loop guard**: it detects and breaks runaway bot-to-bot exchanges before they
turn into an infinite ping-pong. This lets you compose multi-bot workflows
without the classic feedback-loop failure mode.

## Secret brokering over OIDC

The bot token and other connector secrets are never hard-coded into the service.
Instead the connector fetches them at runtime from a **Secrets Service over
OIDC** — it authenticates, then retrieves the credentials it needs. Secrets stay
in the encrypted vault and out of config files and process arguments.

> [!NOTE]
> Inbound messages are posted to `AIHUMMER_INBOUND_URL` and secured by the
> shared HMAC inbound secret (`AIHUMMER_INBOUND_SECRET`). The gateway must have a
> default workspace configured to dispatch them.

## If it didn't work

- **The Telegram connector isn't on the "Channels" screen** — install it first on
  the [Plugins/Marketplace](/en/v1.7/webui/marketplace/) screen; until installed the
  channel isn't shown. Community includes Telegram and MAX.
- **The bot doesn't reply** — check: (1) the token is pasted correctly and the
  Telegram card is "online"; (2) the channel is bound to an agent in "Bindings";
  (3) the sender is registered in the system (by default the agent answers only
  known users).
- If no provider is configured, the error is: `No AI model provider is configured yet — add one in the Models section` [Models](/en/v1.7/webui/models/)
- **"Unauthorized" / token rejected** — the token is wrong or revoked; generate a
  new one with [@BotFather](https://t.me/BotFather) (`/token`) and paste it again.
- **The webhook doesn't arrive** — in webhook mode the gateway must be reachable at
  a public HTTPS URL; on a private network use long polling, which needs no inbound
  port or TLS.

## Where to next

- Compare channels in the [MAX](/en/v1.7/channels/max/),
  [Bitrix24](/en/v1.7/channels/bitrix24/) and [SIP telephony](/en/v1.7/channels/sip/)
  guides.
- Bindings and access setup — [Channels](/en/v1.7/webui/channels/).
- For non-chat sources, see [Generic inbound](/en/v1.7/channels/generic-inbound/).
- Building against the API? See [chat/completions](/en/v1.7/api/chat-completions/).

## Interactive Telegram widgets

Telegram connector 1.2.0 supports Bot API 10.4 and HTML widgets in private bot chats: up to 32 KiB of UTF-8 and 4 KiB after compression. Queries retain the current user's permissions; wallet data is not an approval. An explicit unsupported-widget response permits an ordinary HTML attachment. An uncertain delivery result is not blindly resent.

[Bot API 10.4](https://core.telegram.org/bots/api-changelog#november-9-2026)
