Skip to main content

Telegram

Setup

1. Create a bot

Message @BotFather on Telegram:

  • Send /newbot
  • Follow the prompts
  • Copy the bot token

2. Get your user ID

Message @userinfobot on Telegram to get your numeric user ID.

3. Add to config

{
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"allow_from": ["YOUR_USER_ID"]
}
}
}

4. Start the gateway

suprclaw gateway

Configuration Reference

FieldTypeRequiredDescription
enabledboolYesEnable/disable Telegram
tokenstringYesBot token from @BotFather
allow_from[]stringNoWhitelist of Telegram user IDs
group_triggerobjectNoGroup chat trigger strategy
placeholderobjectNoPlaceholder message config

Group Chats

By default the bot responds to all messages in groups it's added to. To respond only when mentioned:

{
"channels": {
"telegram": {
"group_trigger": {
"mention_only": true
}
}
}
}

Troubleshooting

"Conflict: terminated by other getUpdates"

Another instance is running. Only one suprclaw gateway should run at a time. Find and stop the other instance.