@devries-cameron20 / composio Mirror · read-only
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 21, 04:45 UTC

next
md 2 KB

How do I connect Telegram with a bot token?

Telegram doesn't support OAuth. Composio connects to a Telegram bot using the bot token from BotFather. The connection acts as the bot, not your personal Telegram account.

Create the Telegram bot

  1. In Telegram, start a chat with @BotFather and send /newbot.

Telegram search results for @BotFather 2. Enter a display name for the bot, then a username that ends in bot, for example composio_test_bot.

BotFather chat after /newbot asking for the bot name and username 3. Copy the bot token BotFather returns. It looks like 123456:ABC-DEF1234ghIkl. For an existing bot, send /token to BotFather to get it.

BotFather confirmation message with the bot token redacted

The token gives full control of the bot, so store it securely.

Create the auth config in Composio

  1. In the Composio dashboard, go to Auth Configs, click Create Auth Config, and select Telegram.

Composio Auth Configs page with the Create Auth Config button

Composio toolkit picker with Telegram and its API_KEY badge 2. Keep the authentication type as API Key and click Create Auth Config.

Telegram auth config form with API KEY as the authentication method 3. Click Connect Account, paste the bot token, and confirm the account shows as Active.

Composio connect screen with the Bot Token field, value redacted

See Custom auth configs for the general flow.

Permissions

Telegram bots don't use scopes. What the bot can do depends on which chats, groups, and channels you add it to, and on the admin rights you give it there.