Telegram Bot
Lets an agent operate a Telegram bot: poll incoming updates, send messages and photos.
What it can do
| Method | What it does |
|---|---|
get_updates | Receive incoming updates (messages, callback queries, etc.) via long polling or one-off request. On success, you MUST save last received update to long term memory. When use method, you MUST take last received update … |
get_photo | Download a photo (or any file) by Telegram file_id from get_updates message.photo[], save as AgentFile, return agent_file (id, public_url). |
send_message | Send a text message to a chat. |
send_photo | Send a photo to a chat. Use photo=agent_file_id (from generate_image) or photo=HTTPS URL / file_id. |
send_voice | Send a voice message. Prefer voice_url (HTTPS), e.g. agent_file.public_url from a previous speech generation tool call. Use voice_base64 only when you already have raw audio bytes explicitly. |
How to get credentials
- Open @BotFather in Telegram.
- Send
/newbot, pick a name and username. - BotFather returns a Bot Token in the form
123456789:ABCdefGhIJKlmNoPQRstuVwxyZ. Copy it. - Paste the token in FlyMyAI when setting up the MCP.
If you need the bot in a group, add it manually and disable privacy mode
with /setprivacy in BotFather if it must read all messages.
Fields to fill in FlyMyAI
| FlyMyAI field | Where it comes from |
|---|---|
Bot Token | BotFather's reply after /newbot |
Troubleshooting
401 Unauthorized- token is wrong or the bot was deleted. Ask BotFather for/tokenon the bot.- Bot doesn't see group messages - disable privacy mode with
/setprivacyin BotFather, then remove and re-add the bot.
Links
We love our partners - FlyMy.AI builds with the best. Thanks, Telegram!