Skip to main content

Telegram

Telegram is the fastest public bot surface for many Fased setups. The gateway owns the bot token, receives updates through long polling by default, and keeps DM and group policy separate. Status: supported for DMs and groups. Long polling is default; webhook mode is optional.

Pairing

Pair unknown DMs before they can talk to the Agent.

Groups

Mention gating and group allowlists.

Troubleshooting

Shared channel diagnostics.

Quick setup

  1. In Telegram, open @BotFather.
  2. Run /newbot and save the token.
  3. Open Agents > selected Agent > Channels > Telegram.
  4. Paste the token and keep DM policy on pairing to start.
  5. Save, start the gateway, and approve the first DM pairing.
Config shape:
{
  channels: {
    telegram: {
      enabled: true,
      botToken: "123:abc",
      dmPolicy: "pairing",
      groups: {
        "*": { requireMention: true },
      },
    },
  },
}
Telegram does not use fased channels login telegram. Configure the token from Agent > Channels, config, or env, then start the gateway.

Telegram settings

SettingWhy it matters
Privacy modeControls whether the bot can see all group messages.
Group adminAdmin bots can receive all group messages when configured that way.
/setjoingroupsAllows or denies group adds.
/setprivacyChanges group visibility behavior. Re-add the bot after changing it.
For most groups, keep mention gating on.

Access model

AreaRecommended start
DMsdmPolicy: "pairing"
Groupsrequire mention
Sender accessowner or allowlist first
Agent routingexplicit route per peer/topic when needed

Runtime behavior

  • Long polling is the normal local runtime.
  • Webhook mode is optional when you have a public HTTPS endpoint.
  • Forum topics can route to distinct sessions.
  • Task commands create Agent-owned Tasks; Telegram is only the transport and optional delivery target.

Useful commands

fased gateway
fased channels status telegram
fased pairing list telegram
fased pairing approve telegram <CODE>
fased logs --follow

Troubleshooting

SymptomCheck
Bot does not reply in DMPairing code, DM policy, token, gateway logs.
Bot ignores group messagesMention requirement, privacy mode, admin status.
Topic replies go to wrong placeUse explicit topic routes.
Webhook conflicts with pollingUse one update mode at a time.