Pairing & Access Control

Configure who can communicate with your Clawdbot assistant and which devices can connect to your Gateway.

Overview

Pairing is the explicit owner approval step used for security in two contexts:

  1. DM Pairing - Controls who can communicate with the bot
  2. Device Pairing - Controls which devices/nodes can join the Gateway network

DM Pairing (Inbound Chat Access)

When a channel uses the pairing DM policy, unknown senders receive a short code and their messages are held until you approve them.

How It Works

  1. Unknown user sends a message to your bot
  2. Bot responds with an 8-character pairing code
  3. Messages are held in a pending queue
  4. You approve or reject the pairing request
  5. Approved users can communicate freely

Pairing Code Characteristics

  • 8 uppercase characters
  • Ambiguous characters excluded (0, O, 1, I)
  • Expires after 1 hour
  • Maximum 3 pending requests per channel (default)

Approval Commands

# List pending pairing requests
clawdbot pairing list telegram
clawdbot pairing list whatsapp

# Approve a pairing request
clawdbot pairing approve telegram ABC12DEF
clawdbot pairing approve whatsapp XYZ98GHI

# Reject a pairing request
clawdbot pairing reject telegram ABC12DEF

Supported Channels

ChannelCommand
Telegramclawdbot pairing list telegram
WhatsAppclawdbot pairing list whatsapp
Signalclawdbot pairing list signal
iMessageclawdbot pairing list imessage
Discordclawdbot pairing list discord
Slackclawdbot pairing list slack

Storage Locations

FilePurpose
~/.clawdbot/credentials/<channel>-pairing.jsonPending requests
~/.clawdbot/credentials/<channel>-allowFrom.jsonApproved users

Device Pairing

Nodes connecting to the Gateway as devices with role: node require approval through device pairing requests.

Device Approval Commands

# List all devices (pending and paired)
clawdbot devices list

# Approve a device
clawdbot devices approve <requestId>

# Reject a device
clawdbot devices reject <requestId>

# Remove a paired device
clawdbot devices remove <deviceId>

Storage Locations

FilePurpose
~/.clawdbot/devices/pending.jsonPending device requests
~/.clawdbot/devices/paired.jsonApproved devices

DM Policies

Configure DM policy in ~/.clawdbot/clawdbot.json:

{
  "channels": {
    "whatsapp": {
      "dmPolicy": "pairing",
      "allowFrom": []
    }
  }
}

Available Policies

PolicyDescription
pairingRequire approval for new senders
allowlistOnly allow pre-approved senders
openAllow all senders (not recommended)

Security Best Practices

  1. Use pairing mode for channels exposed to unknown users
  2. Review pending requests regularly
  3. Use allowlist mode for sensitive channels
  4. Limit pending requests to prevent spam
  5. Audit approved users periodically