Skip to main content
Telegram logo

Telegram Bot

Lets an agent operate a Telegram bot: poll incoming updates, send messages and photos.

What it can do

MethodWhat it does
get_updatesReceive 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_photoDownload a photo (or any file) by Telegram file_id from get_updates message.photo[], save as AgentFile, return agent_file (id, public_url).
send_messageSend a text message to a chat.
send_photoSend a photo to a chat. Use photo=agent_file_id (from generate_image) or photo=HTTPS URL / file_id.
send_voiceSend 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

  1. Open @BotFather in Telegram.
  2. Send /newbot, pick a name and username.
  3. BotFather returns a Bot Token in the form 123456789:ABCdefGhIJKlmNoPQRstuVwxyZ. Copy it.
  4. 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 fieldWhere it comes from
Bot TokenBotFather's reply after /newbot

Troubleshooting

  • 401 Unauthorized - token is wrong or the bot was deleted. Ask BotFather for /token on the bot.
  • Bot doesn't see group messages - disable privacy mode with /setprivacy in BotFather, then remove and re-add the bot.
We love our partners - FlyMy.AI builds with the best. Thanks, Telegram!