Skip to main content
The ironclaw pairing command manages direct message (DM) pairing requests for messaging channels like Telegram and Slack. Pairing allows you to approve or deny incoming messages from unknown senders.

Usage

Subcommands

list

List pending pairing requests for a channel.
string
required
Channel name (e.g., telegram, slack)
boolean
Output results in JSON format
Example:
Example output:

approve

Approve a pairing request by code.
string
required
Channel name (e.g., telegram, slack)
string
required
Pairing code to approve (e.g., ABC12345)
Example:
Example output:

How DM Pairing Works

IronClaw’s DM pairing system protects you from unsolicited messages while allowing approved users to communicate with your agent.
1

Pairing request initiated

When an unknown user sends a message to your IronClaw agent through a channel (Telegram, Slack, etc.), the message is queued and a pairing code is generated.
2

User receives pairing code

The sender receives a message with a unique pairing code and instructions to wait for approval:
3

Owner lists pending requests

The IronClaw owner runs ironclaw pairing list <channel> to see pending requests with codes, user information, and original messages.
4

Owner approves or ignores

The owner can:
  • Approve: Run ironclaw pairing approve <channel> <code> to allow future messages
  • Ignore: Leave the request pending (it will expire after a configurable timeout)
5

User can now communicate

Once approved, the user can freely send messages to the IronClaw agent. The queued message is also delivered.

Pairing Policies

Channels can be configured with different pairing policies:

Strict (default)

All unknown senders must be explicitly approved via pairing codes

Allow all

Accept messages from anyone without pairing (not recommended for privacy)

Allowlist only

Only accept messages from a pre-configured list of user IDs

Denylist

Accept all messages except from blocked user IDs
Pairing policies are configured per-channel in the onboarding wizard or via environment variables. See the channel configuration guide for details.

Pairing Expiration

Pairing requests expire after a configurable timeout (default: 24 hours). Expired requests are automatically removed from the pending list. To adjust expiration:

Examples

Approve a Telegram DM request

Monitor pairing requests in JSON

Batch approval workflow

Troubleshooting

If ironclaw pairing list shows no requests:
  • Ensure the channel is running and connected
  • Verify the channel is configured with pairing enabled (not allow_all policy)
  • Check if requests have expired (default: 24 hours)
  • Ensure messages are being sent to the correct bot/channel
If approval fails with “code not found”:
  • Verify the code is correct (codes are case-sensitive)
  • The request may have expired (default: 24 hours)
  • List current requests again: ironclaw pairing list <channel>
If messages are still blocked after approval:
  1. Restart the IronClaw agent to reload pairing state
  2. Verify the channel is running: ironclaw status
  3. Check the channel policy: ironclaw config get channels.<channel>.pairing_policy
  4. Ensure no denylist is blocking the user ID
To disable pairing and accept all messages (not recommended):
Or reconfigure during onboarding:

Telegram setup

Configure Telegram channel with pairing

Channels overview

Learn about IronClaw’s multi-channel architecture

ironclaw status

Check channel connection status

Configuration

Channel environment variables