How Pairing Works
Enabling Pairing
Pairing is enabled with thepairing DM policy:
Supported Channels
Pairing is supported on these channels:- WhatsApp - Identifies by phone number (E.164)
- Telegram - Identifies by user ID (numeric)
- Discord - Identifies by user ID (snowflake)
- Slack - Identifies by user ID (e.g., U123ABC456)
- Signal - Identifies by phone number or UUID
- iMessage - Identifies by phone number, email, or chat ID
Viewing Pending Requests
List all pending pairing requests:Approving Requests
By Code
Approve using the pairing code:By Identifier
Approve using the user’s identifier directly:By Interactive Selection
Let the CLI prompt you:Denying Requests
Deny a pairing request:Pairing Token Lifecycle
Generation
- Tokens are generated automatically when an unknown user messages
- Format:
ABC-123-DEF(3 groups of alphanumeric characters) - Tokens are unique per user per channel
Expiration
Pairing tokens expire after 24 hours by default. Configure this:"1h"- 1 hour"24h"- 24 hours (default)"7d"- 7 days
Storage
Pairing tokens are stored in:Automatic Allowlist Updates
When you approve a pairing request, OpenClaw automatically:- Adds the user’s identifier to
allowFromin your config - Writes the updated config to disk
- Sends a confirmation message to the user
+15555550123 on WhatsApp updates your config:
QR Code Pairing (WhatsApp & Signal)
WhatsApp and Signal use QR codes for initial device pairing:- A QR code appears in your terminal
- Open WhatsApp on your phone → Settings → Linked Devices
- Tap “Link a Device” and scan the QR code
- Your device is now paired
Signal
- A QR code appears
- Open Signal on your phone → Settings → Linked Devices
- Tap ”+” and scan the QR code
- Your device is now linked
Security Considerations
Pairing Codes
- Short-lived - Expire after 24 hours by default
- Single-use - Invalidated after approval or denial
- Channel-specific - A code for WhatsApp won’t work on Telegram
- Operator-controlled - Only you can approve requests
Best Practices
- Review requests promptly - Don’t leave pairing requests pending for days
- Verify the sender - Before approving, confirm you know who’s requesting access
- Use allowlist mode for production bots with a fixed set of users
- Monitor approvals - Check
openclaw pairing listregularly - Revoke access if needed by removing from
allowFrom
Revoking Access
If you need to revoke a user’s access:allowFrom:
Troubleshooting
Pairing code not sent
Pairing code not sent
Check that:
dmPolicyis set to"pairing"for the channel- The channel is enabled and gateway is running
- The user is not already in
allowFrom
Approval not working
Approval not working
Common issues:
- Wrong channel name (use
openclaw pairing listto see valid channels) - Code typo (codes are case-sensitive:
ABC-123-DEF) - Code expired (default: 24 hours)
User still cannot message after approval
User still cannot message after approval
After approval, the user should be in If missing, manually add them:Then restart the gateway:
allowFrom. Verify:Pairing storage full or corrupted
Pairing storage full or corrupted
If you encounter issues with pairing storage, you can reset it:
QR code not appearing (WhatsApp/Signal)
QR code not appearing (WhatsApp/Signal)
For WhatsApp:
- Ensure
web.enabled: truein config - Check logs:
openclaw logs --follow - Try again:
openclaw channels login whatsapp --force
- Ensure signal-cli is installed
- Try:
signal-cli link -n "OpenClaw"
Advanced Configuration
Custom Pairing Messages
Customize the pairing request message:{code}- The pairing code{channel}- Channel name (e.g., “whatsapp”){identifier}- User’s identifier
Notification on New Requests
Get notified of new pairing requests:CLI Reference
List Pending Requests
[channel]- Optional: filter by channel (e.g.,whatsapp,telegram)
Approve Request
Deny Request
Revoke Access
allowFrom in your config.
Next Steps
Configuration Reference
Full configuration options
WhatsApp Setup
Set up WhatsApp with QR pairing
Security Best Practices
Secure your OpenClaw deployment
CLI Commands
Full pairing command reference

