Complete step-by-step tutorial to connect OpenClaw to Telegram, WhatsApp, or Discord
This tutorial will walk you through connecting OpenClaw (formerly Moltbot, Clawdbot) to your first messaging channel. We'll use Telegram as our example since it's the easiest to set up, but the process is similar for WhatsApp and Discord. Estimated time: 10-15 minutes.
Before starting, ensure you have:
OpenClaw supports multiple messaging platforms. For this tutorial, we'll use Telegram because:
Easiest setup, bot-based, great for beginners
QR code pairing, uses your personal account
Bot-based, great for communities and servers
For other channels: See the Channels Reference for WhatsApp, Discord, Slack, Signal, iMessage, and more.
Telegram uses bots, which are special accounts that can be controlled programmatically. Here's how to create one:
/start/newbotYou can customize your bot with BotFather commands:
/setdescription - Set what your bot does/setabouttext - Set bot bio/setuserpic - Set bot profile pictureThese are optional - your bot will work without them.
Now we'll add your Telegram bot to OpenClaw's configuration.
Your OpenClaw configuration is located at ~/.clawdbot/moltbot.json. Open it in your preferred text editor:
# On macOS/Linux:
nano ~/.clawdbot/moltbot.json
# or
code ~/.clawdbot/moltbot.json # VS Code
# or
open ~/.clawdbot/moltbot.json # Default editor
Add the Telegram channel configuration to your file. If you already have a configuration file, add the channels section:
{
"agent": {
"model": "anthropic/claude-opus-4-5"
},
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_BOT_TOKEN_HERE"
}
}
}
Replace YOUR_BOT_TOKEN_HERE with the token you copied from BotFather.
123456789:ABCdefGHIjklMNOpqrsTUVwxyz,
your configuration would look like: "token": "123456789:ABCdefGHIjklMNOpqrsTUVwxyz"
After saving your configuration:
# If Gateway is running as a service:
openclaw gateway restart
# Or if running manually, stop and restart:
openclaw gateway --port 18789 --verbose
Now let's verify everything works!
/start to initialize the botSend a simple message to your bot, like:
Your OpenClaw assistant should respond! If it does, congratulations - your channel is working! 🎉
If your bot doesn't respond:
openclaw gateway statusThis usually means:
If bot works but you see errors:
For more troubleshooting help, see our Troubleshooting Guide.
Now that you have a channel connected, here's what to explore next:
Want to set up other channels? Here are quick links to their reference guides:
Each channel has its own setup process, but the general flow is similar: create/link account → get credentials → configure OpenClaw → test connection.