Connect OpenClaw to Your
Messaging Apps
Step-by-step instructions for connecting OpenClaw to Telegram, WhatsApp, and Discord — the three most popular channels.
Telegram Easiest — Start Here
Telegram is the recommended first channel. It’s free, reliable, has no rate limits for personal bots, and takes about 5 minutes to configure.
- 1
Open Telegram and find BotFather
Search for @BotFather in Telegram. This is Telegram’s official bot creation service. Tap Start.
- 2
Create your bot
Send
/newbot. BotFather will ask for a name (e.g. “My OpenClaw”) and a username (must end in “bot”, e.g. “myopenclaw_bot”). Copy the API token it returns. - 3
Add the token to your .env file
# Add to ~/openclaw/.env
TELEGRAM_BOT_TOKEN=your-token-from-botfather - 4
Restart OpenClaw
docker compose down && docker compose up -d - 5
Start chatting
Search for your bot’s username in Telegram, tap Start, and send your first message. You should receive a reply within a few seconds.
Set your bot to private mode so only you can interact with it. In BotFather, send /setprivacy → select your bot → Enable. This prevents strangers from messaging your agent.
Some OpenClaw skills need your personal Telegram Chat ID. Get it by messaging @userinfobot — it replies instantly with your ID number. Add it to .env as TELEGRAM_ALLOWED_CHAT_IDS=your-id to whitelist only your account.
WhatsApp Medium Difficulty
WhatsApp works via QR code scanning that links your account (or a dedicated number) to OpenClaw’s Gateway. More setup steps than Telegram, but works on the world’s most popular messaging app.
WhatsApp allows only one device per number. If you link your main number, it will disconnect from your regular WhatsApp Web. Consider getting a cheap SIM card or a VoIP number specifically for your OpenClaw agent.
- 1
Open the OpenClaw Control UI
SSH tunnel to your server:
ssh -L 3000:localhost:3000 user@YOUR_IPthen openhttp://localhost:3000. - 2
Navigate to Channels → WhatsApp
In the Control UI sidebar, find Channels and select WhatsApp. Click Connect.
- 3
Scan the QR code
A QR code will appear. On your phone, open WhatsApp → Settings → Linked Devices → Link a Device, and scan the QR code.
- 4
Wait for confirmation
The Control UI will show “Connected” once the QR scan succeeds. This usually takes 5–10 seconds.
- 5
Send a test message
Message your own number (or a WhatsApp contact) and ask OpenClaw to respond. WhatsApp sessions can take 30–60 seconds to warm up on first use.
WhatsApp sessions are stored in your OpenClaw data directory. Back up ~/openclaw/data/.openclaw/whatsapp-session/ so you don’t need to re-scan QR codes after server restarts.
Discord Medium Difficulty
Discord uses bot tokens and requires setting up an application in the Discord Developer Portal. Great for team servers and developer communities.
- 1
Create a Discord Application
Go to discord.com/developers/applications, click New Application, and give it a name.
- 2
Create a Bot
In the left sidebar, click Bot → Add Bot. Under Token, click Reset Token and copy it. Enable Message Content Intent under Privileged Gateway Intents.
- 3
Invite the bot to your server
Go to OAuth2 → URL Generator. Check bot scope and grant permissions: Send Messages, Read Message History, Read Messages/View Channels. Copy and open the generated URL to invite the bot.
- 4
Add the token to .env
DISCORD_BOT_TOKEN=your-discord-bot-token
DISCORD_CHANNEL_ID=your-channel-idRight-click a Discord channel → Copy ID (enable Developer Mode in Discord Settings → Advanced first).
- 5
Restart and test
docker compose down && docker compose up -dSend a message in your Discord channel mentioning the bot. It should respond within a few seconds.
Slack More Complex
Slack integration requires creating a Slack App, configuring OAuth scopes, and setting up event subscriptions. Ideal for team workspaces.
- 1
Create a Slack App
Go to api.slack.com/apps → Create New App → From Scratch. Give it a name and select your workspace.
- 2
Configure OAuth Scopes
Under OAuth & Permissions, add Bot Token Scopes:
app_mentions:read,chat:write,im:history,im:read,im:write. - 3
Install to Workspace and copy tokens
Click Install to Workspace. Copy the Bot User OAuth Token (starts with xoxb-) and the Signing Secret from Basic Information.
- 4
Add to .env
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_SIGNING_SECRET=your-signing-secret - 5
Set up Event Subscriptions
Under Event Subscriptions, enable events and set the Request URL to your OpenClaw gateway endpoint. Subscribe to
message.imandapp_mentionbot events. Note: Slack requires a publicly accessible URL — use a reverse proxy or Tailscale funnel.
Unlike Telegram and Discord which use polling, Slack sends webhooks to your server. This means OpenClaw needs a publicly reachable HTTPS URL. Set up Nginx as a reverse proxy with Let’s Encrypt, or use Cloudflare Tunnel (free) to expose your local port securely.
Channels Connected — What’s Next?
Make sure your agent is secure and won’t run up unexpected costs before you start setting up automations.
Security Hardening Guide Prevent API Cost Overruns →
