A step-by-step guide for connecting the Claude Code Telegram plugin to a Telegram group chat.
- Claude Code installed and running
- The Telegram plugin installed (
/install-plugin telegramor via the plugin marketplace) - A Telegram bot token from @BotFather
- Message @BotFather on Telegram and run
/newbot - Save the bot token
- Disable Group Privacy:
/mybots→ select your bot → Bot Settings → Group Privacy → Turn off- By default, bots in groups only see
/commandsand@mentions. Disabling privacy lets the bot see all messages.
- By default, bots in groups only see
Run the Telegram access skill in Claude Code to set up your bot token:
/telegram:configure
Paste your bot token when prompted.
DM your bot on Telegram. It will reply with a 6-character pairing code. Approve it in Claude Code:
/telegram:access pair <code>
- Open your Telegram group
- Go to group settings → Add Members → search for your bot
- Add the bot to the group
This is the tricky part. The Telegram plugin's channel server consumes all updates via polling, so you can't just call getUpdates. Here's the workaround:
-
Stop the channel server temporarily:
# Find the process ps aux | grep telegram | grep -v grep # Kill it kill <PID>
-
Send a message in the group (mention the bot:
@yourbot hello) -
Fetch the group chat ID using the Bot API:
curl -s "https://api.telegram.org/bot<TOKEN>/getUpdates" \ | jq '.result[] | select(.message.chat.type == "group" or .message.chat.type == "supergroup") | .message.chat | {id, title}'
-
The group ID will be a negative number (e.g.,
-5100294780). Save it. -
Restart the channel server — reload plugins in Claude Code:
/reload-plugins
In Claude Code, run:
/telegram:access group add <groupId>
For example:
/telegram:access group add -5100294780
By default, requireMention is true — the bot only responds when @mentioned. To let it see all messages:
/telegram:access group add -5100294780 --no-mention
| Flag | Effect |
|---|---|
| (default) | Bot only responds to @mentions in the group |
--no-mention |
Bot sees and can respond to all messages |
--allow id1,id2 |
Restrict which group members can interact with the bot |
Send a message in the group. If requireMention is enabled, mention the bot:
@yourbot hello
The bot should respond in the group chat.
The config lives at ~/.claude/channels/telegram/access.json:
{
"dmPolicy": "pairing",
"allowFrom": ["<userId1>", "<userId2>"],
"groups": {
"-5100294780": {
"requireMention": false,
"allowFrom": []
}
},
"pending": {}
}- Bot doesn't see group messages: Make sure Group Privacy is disabled in BotFather
getUpdatesreturns empty: The channel server is consuming updates — stop it first (Step 5)- Bot sees messages but doesn't reply: Check that the group ID is in
access.jsonundergroups - "Typing" indicator but no reply: The MCP connection may need a refresh — run
/reload-plugins
- The bot uses judgment on when to reply in group chats — it doesn't need to respond to every message
- You can react to messages with emoji instead of sending full replies
- DM access and group access are configured independently