INTEGRATIONS

Connect Openclaw to
Telegram & WhatsApp

2026-01-28 12 min read

Why Connect Messaging Channels?

Openclaw becomes much more valuable once it’s reachable where you and your users already are—Telegram groups, WhatsApp chats, or other channels. The official Moltbot/Openclaw docs provide a CLI‑driven flow for this via openclaw channels login; this guide repackages that into a clear, end‑to‑end walkthrough.

1. Prerequisites

  • Openclaw gateway installed and running on your VPS.
  • You can SSH into the VPS as clawd or root.
  • You’ve already run the onboarding wizard: openclaw onboard (provider + API key configured).

2. High-Level Flow (Both Telegram & WhatsApp)

  1. SSH into your VPS.
  2. Run openclaw channels login.
  3. Choose the channel (Telegram or WhatsApp) from the CLI menu.
  4. Provide the credentials (bot token, QR code scan, or Cloud API keys).
  5. Send a test message to confirm everything works.

3. Connect Telegram

Step 3.1 – Create a Telegram bot

  1. Open Telegram and start a chat with @BotFather.
  2. Send /newbot and follow the prompts (bot name + username).
  3. BotFather will give you a bot token that looks like: 1234567890:AAEexample-TokenFromBotFather

Keep this token secret; anyone with it can send messages as your bot. Store it in a password manager—not in your local shell history.

Step 3.2 – Run the channels CLI

SSH into your VPS:

ssh clawd@YOUR_VPS_IP
# or
ssh root@YOUR_VPS_IP

Then start the channels wizard:

openclaw channels login

According to the official channels docs, you’ll see a menu of supported integrations. Choose Telegram.

Step 3.3 – Paste your Telegram bot token

The CLI will prompt you for:

  • Bot token (from BotFather).
  • Optional: default chat or channel for system messages.

Paste the token directly into the VPS terminal when prompted. The wizard will validate it against Telegram’s API and persist it in Openclaw’s config under ~/.openclaw/.

Step 3.4 – Test the Telegram integration

  1. In Telegram, search for your bot by the username you chose with BotFather.
  2. Start a chat and send a message like “/start” or “Hi Openclaw”.
  3. Check the Openclaw dashboard (via SSH tunnel) to confirm the message appears in logs and the bot replies.

4. Connect WhatsApp

WhatsApp integration for self‑hosted assistants typically uses either:

  • WhatsApp Business Cloud API (Meta/Facebook).
  • Third‑party gateways (like Twilio WhatsApp) that expose a webhook.

The exact UX in openclaw channels login may differ depending on which backend you’ve configured, but the high‑level steps from the Openclaw docs are the same.

Step 4.1 – Prepare your WhatsApp integration

For the official Cloud API:

  1. Create a Facebook Business account and enable WhatsApp Business Cloud API.
  2. Create a WhatsApp app, get a phone number ID and WhatsApp Business account ID.
  3. Generate a permanent access token (used as API key).
  4. Configure a webhook URL (Openclaw’s gateway URL) in the Meta dashboard, if required by your integration mode.

Step 4.2 – Run the channels CLI for WhatsApp

From your SSH session:

openclaw channels login

Choose WhatsApp in the channels list. Based on the current docs, the wizard will ask you for:

  • Integration type (Cloud API vs gateway).
  • Phone number ID and business account ID (for Cloud API).
  • Access token (API key) for WhatsApp Business or the gateway provider.

All credentials are stored server‑side on your VPS in Openclaw’s config, not in ClawdInstaller.

Step 4.3 – Scan QR code (gateway mode)

If you’re using a QR‑based gateway (like a local WhatsApp bridge), the CLI may show a QR code directly in your terminal. In that case:

  1. Open WhatsApp on your phone → Linked Devices → Link a Device.
  2. Scan the QR code shown in your terminal.
  3. Wait for confirmation from the CLI that the session is active.

Step 4.4 – Test the WhatsApp integration

Once the channel is connected:

  • Send a message from your WhatsApp client to the connected number.
  • Confirm the message appears in the Openclaw dashboard logs.
  • Verify Openclaw replies correctly.

5. Security Best Practices for Channels

Messaging integrations add power but also increase your attack surface. The Openclaw docs and general security best practices recommend:

  • Keep bot tokens and API keys only on the VPS; never commit them to Git.
  • Use a dedicated VPS user (like clawd) for running the gateway.
  • Restrict dashboard access to 127.0.0.1 + SSH tunnel (do not expose port 18789 directly to the internet).
  • Rotate WhatsApp/Telegram tokens if you suspect compromise.
  • Review logs periodically for suspicious activity.

6. Quick Reference Commands

# SSH into VPS
ssh clawd@YOUR_VPS_IP

# Run setup wizard (once)
openclaw onboard

# Connect channels (Telegram, WhatsApp, etc.)
openclaw channels login

# Check gateway status
sudo systemctl status openclaw.service

With Openclaw wired into Telegram and WhatsApp, your VPS‑hosted assistant moves from “dev toy” to a real, production‑capable automation layer that lives where your users already spend their time.