بازگشت به راهنما

Telegram Bot Setup

How to connect your AI agent to Telegram with your own bot

Telegram Bot Setup

Each agent can have its own Telegram bot. You create the bot, paste the token, and your agent is live on Telegram.

Step 1: Create a Bot with @BotFather

  1. Open Telegram and search for @BotFather
  2. Send /newbot
  3. Choose a name for your bot (e.g. "My AI Agent")
  4. Choose a username (must end in bot, e.g. MyAgentBot)
  5. BotFather will give you an API token — it looks like 1234567890:ABCdefGHIjklMNOpqrsTUVwxyz

Important: Copy the token without the bot prefix. Just the number and hash part.

Step 2: Add the Token to Your Agent

  1. Go to your Account Dashboard
  2. Click on your agent
  3. Paste the bot token in the Telegram Bot Token field
  4. Save

The system will automatically register a webhook so your bot receives messages.

Step 3: Start Chatting

Open your bot in Telegram and send a message. Your AI agent will respond!

Privacy & Security

  • Private chats: Only the bot owner (the first person to message it) can chat with the bot in private. If someone else messages it, they'll see: "This bot is private and only available to its owner."
  • Your bot token is stored securely and only used for message delivery.

Disable Privacy Mode (for Groups)

If you want your bot to work in Telegram groups, you need to disable privacy mode:

  1. Open @BotFather on Telegram
  2. Send /setprivacy
  3. Select your bot
  4. Choose Disable

This lets your bot see all messages in groups, not just commands and @mentions.

Troubleshooting

Bot doesn't respond?

  • Make sure you saved the correct token (without bot prefix)
  • Check that your agent subscription is active
  • Try removing and re-adding the token

Getting "webhook failed" errors?

  • The webhook is set automatically when you save the token. Wait a few seconds and try again.

Bot responds to strangers?

  • This shouldn't happen. The bot only responds to its owner in private chat. If you see unexpected behavior, contact support.