Skip to main content

Channels

Channels are messaging platform integrations that connect OpenClaw to WhatsApp, Telegram, Discord, Slack, Signal, iMessage, and other platforms. Each channel handles platform-specific authentication, message normalization, and delivery.

What is a Channel?

A channel is a messaging platform adapter that:
  • Authenticates with the messaging platform
  • Receives inbound messages and normalizes them
  • Delivers outbound messages from agents
  • Manages platform-specific features (media, reactions, threads)
  • Enforces access control via allowlists and pairing

Supported Channels

OpenClaw supports multiple messaging platforms out of the box:

WhatsApp

Web-based via Baileys library

Telegram

Bot API via grammY

Discord

Bot via discord.js

Slack

App via Bolt SDK

Signal

CLI-based via signal-cli

iMessage

macOS only, AppleScript bridge
Extension Channels:
  • Microsoft Teams
  • Google Chat
  • Matrix
  • Zalo
  • Voice Call
Location: src/channels/, extensions/*/

Channel Configuration

Basic Setup

Channels are configured under channels.<channel-id> in your OpenClaw config:
Location: src/channels/plugins/config-schema.ts:1

Channel-Specific Settings

Each channel has unique configuration options: WhatsApp:
Telegram:
Discord:
Location: src/channels/plugins/

Channel Types

Chat Types

Channels support different chat types:
  • direct: Direct messages (DMs) with individual users
  • group: Group chats with multiple participants
  • channel: Broadcast channels (Telegram, Slack)
  • thread: Threaded conversations
Location: src/channels/chat-type.ts:1

Account Support

Some channels support multiple accounts:
Location: src/channels/plugins/account-helpers.ts:1

Message Routing

Allowlists (Access Control)

Channels use allowlists to control who can message the agent:
Allowlist Patterns:
  • *: Allow everyone (wildcard)
  • 123456789: User ID
  • user:alice: Username
  • @alice: Username with @ prefix
  • +15551234567: Phone number (E.164 format)
Location: src/channels/plugins/allowlist-match.ts:1
For production, use explicit allowlists instead of * to prevent unauthorized access.

Group Policies

Control how the agent responds in group chats:
Group Policy Options:
  • open: Allow all group messages (mention gating applies)
  • allowlist: Only allow messages from users in allowlist
  • disabled: Ignore all group messages
Location: src/config/types.base.ts:8

Mention Patterns

In group chats, the agent responds when mentioned:
Built-in Mention Detection:
  • Discord: @bot-name
  • Telegram: @bot_username
  • Slack: @bot-name
  • WhatsApp: Quote replies
Location: src/channels/mention-gating.ts:1, src/channels/plugins/group-mentions.ts:1

DM vs Group Routing

Direct messages and group chats can route to different agents:
Location: src/routing/resolve-route.ts:295

Pairing Flow

DM Pairing (Security)

By default, unknown DM senders must pair before accessing the agent:
  1. User sends first message:
  2. Bot sends pairing code:
  3. Admin approves pairing:
  4. User can now chat:
Pairing Storage: ~/.openclaw/allowlists/{channel}.json Location: src/channels/plugins/pairing.ts:1, src/pairing/

Pairing Commands

Location: src/commands/pairing.ts:1
Use "allowFrom": ["*"] to skip pairing and allow all users (not recommended for production).

Channel Status

Monitoring Channels

Check channel connection status:
Output:
Location: src/commands/channels.ts:1

Channel Lifecycle

Location: src/channels/plugins/status.ts:1

Channel Configuration Examples

Multi-Account Setup

DM-Only Mode

Open Groups, Restricted DMs

Channel-Specific Media Settings

Location: src/channels/plugins/media-limits.ts:1

Advanced Features

Message Actions

Channels support platform-specific actions:
  • Reactions: React to messages with emoji
  • Edits: Edit sent messages
  • Deletions: Delete messages
  • Typing Indicators: Show “typing…” status
  • Read Receipts: Mark messages as read
Location: src/channels/plugins/message-actions.ts:1

Media Handling

Channels automatically download and process media:
  • Images: JPG, PNG, GIF, WebP
  • Videos: MP4, MOV, WebM
  • Audio: MP3, OGG, M4A
  • Documents: PDF, TXT, DOCX
  • Voice Messages: Platform-specific formats
Location: src/channels/plugins/normalize/

Thread Support

Channels that support threads (Discord, Slack) create sub-sessions:
Location: src/routing/session-key.ts:254

Troubleshooting

Channel Won’t Connect

  1. Check credentials:
  2. Verify channel status:
  3. Check logs:

Messages Not Delivered

  1. Verify allowlist:
  2. Check pairing status:
  3. Test routing:

Channel Authentication Failed

Telegram:
Discord:
WhatsApp:
Location: src/commands/login.ts:1
Never commit channel credentials to version control. Use environment variables or secure storage.

Next Steps

Session Management

Learn how sessions track conversation context

Message Routing

Configure multi-agent routing rules

Channel Setup Guides

Platform-specific setup instructions

Access Control

Advanced security and allowlist configuration