Telegram
Anyy connects to Telegram through a bot token and the Bot API long-polling profile. It supports direct messages, groups, inbound media, pairing, and live health checks.
1. Create a Telegram Bot
In Telegram, open the official BotFather account:
- Send
/newbot. - Choose the bot's display name and username.
- Copy the bot token once.
- Review BotFather privacy/group settings if you will add the bot to groups.
Treat the token as a password. Anyone who has it can act as the bot.
2. Add the Account in Anyy
Open Dashboard → Channel → Add → Telegram. Enter the account ID and bot token for the Bot API long-polling entry. Use the CLI wizard below for policy settings; the Dashboard credential form does not include them.
CLI setup is also available:
anyy setup channel
Choose Telegram from the wizard. The setup flow stores the token as a Profile secret reference and verifies the remote identity with Telegram getMe before the adapter becomes healthy.
3. Choose Access Policies
Default policies are:
| Conversation | Default |
|---|---|
| Direct messages | pairing |
| Groups | mention |
Direct-message policy can be open, allowlist, pairing, or disabled. The current setup catalog offers group policy mention, allowlist, open, or disabled. Existing allowlists use Telegram numeric user/chat identities; current Telegram setup does not expose list-entry editing. See the shared setup limits.
An open bot can spend provider quota and expose tools to unexpected senders. Verify the sender access policy and enabled tools before widening access.
4. Start and Verify
anyy channel reload
anyy channel doctor telegram
Then send the bot a direct message. With the default pairing policy, list and approve the pending sender from the CLI:
anyy channel pairing list --channel telegram
anyy channel pairing approve --request REQUEST_ID
After approving the sender pairing request, send another message and confirm that Anyy replies in the same Telegram conversation.
Groups and Mentions
Add the bot to a group and use its @username with the default mention policy. If Telegram privacy settings prevent the bot from receiving the intended group messages, adjust them in BotFather and re-add/reload the bot as required by Telegram.
Telegram threads are not claimed by the current adapter; do not rely on topic-specific routing.
Media and Long Replies
Anyy can stage supported inbound Telegram media for the session. Long outbound text is split to the adapter's text limit. Media download and message size remain subject to the adapter and Telegram limits.
Troubleshooting
| Symptom | Check |
|---|---|
| Token is rejected | Regenerate/copy the BotFather token and replace the saved credential |
| Bot stays in backoff | Run anyy channel doctor telegram; verify getMe and network access to Bot API |
| DM receives pairing notice but no answer | Approve the pending request, then send a new message |
| Group message is ignored | Mention the bot, check group policy/allowlist, and review BotFather privacy mode |
| Duplicate/old messages appear | Inspect long-poll health and reload; Anyy persists the Telegram update offset |
For shared channel controls, see Messaging Platforms.