How do I connect a Telegram bot?

Make a bot in Telegram with BotFather and copy the token it gives you. Then select Connect a bot in Settings > Connected bots, choose Telegram and the agent, enter the bot's username and paste its token.

A Telegram bot lets you chat with one of your agents in Telegram. Each bot talks to one agent.

Make the bot in Telegram

  1. In Telegram, open a chat with @BotFather, Telegram's own bot for making bots.
  2. Send /newbot and follow its questions. Choose a name, and a username that ends in bot, such as my_agent_bot.
  3. BotFather replies with the bot's token. Copy it.

Connect it to an agent

  1. Go to Settings > Connected bots in your dashboard and select Connect a bot.
  2. Choose Telegram as the App, and the Agent it should talk to.
  3. Enter the bot's username, such as @my_agent_bot.
  4. Paste the Bot token and select Connect.

The bot shows Live once it's connected. Open it in Telegram and send it a message.

You can also connect a Telegram bot while you deploy, in the Messaging step of Deploy an agent.

Using it in a group

To let the bot read every message in a Telegram group, not only the ones that mention it, turn off its group privacy. In BotFather, send /setprivacy, choose the bot and select Disable. Then remove the bot from the group and add it again.

Your bot's token lets anyone control the bot. Paste it only into your Rarity dashboard. If it's ever shared, ask BotFather for a new token and connect the bot again.