Follow these steps to securely connect OpenClaw to Telegram.
- Open Telegram and search for @BotFather.
- Type
/newbotand follow the instructions to set your bot's name and username. - Save the API Token: Keep the provided token (e.g.,
123456:ABC-DEF...) safe. - Security Tip: Use the
/setprivacycommand in @BotFather to ensure Privacy Mode is Enabled, preventing the bot from reading unauthorized group messages.
- Run
openclaw configure --section channelson your Raspberry Pi. - Select Telegram as your communication channel.
- Paste the API Token you received from BotFather.
OpenClaw uses a mandatory pairing system to ensure only you can control it:
- Start a chat with your new bot in Telegram and hit Start.
- The bot will reply with a unique Pairing Code.
- In your Raspberry Pi terminal, run:
openclaw pairing approve telegram [YOUR_CODE]
Once completed, your Telegram account is whitelisted.