Pairing
“Pairing” 是 OpenClaw 的明确所有者批准步骤。 它用于两个地方:
- DM Pairing(谁可以和机器人对话)
- Node Pairing(哪些设备/Node 可以加入 Gateway 网络)
安全背景:安全
1) DM Pairing(入站聊天访问)
当 Channel 配置了 DM 策略 pairing 时,未知发送者会收到一个短代码,他们的消息不会被处理,直到你批准。
默认 DM 策略记录在:安全
Pairing 代码:
- 8 个字符,大写,不含易混淆字符(
0O1I)。 - 1 小时后过期。机器人只在创建新请求时发送 Pairing 消息(大约每个发送者每小时一次)。
- 待处理的 DM Pairing 请求默认限制为每个 Channel 3 个;超出的请求会被忽略,直到有一个过期或被批准。
批准发送者
openclaw pairing list telegram
openclaw pairing approve telegram <CODE>
支持的 Channel:telegram、whatsapp、signal、imessage、discord、slack。
状态存储位置
存储在 ~/.openclaw/credentials/ 下:
- 待处理请求:
<channel>-pairing.json - 已批准的 Allowlist 存储:
<channel>-allowFrom.json
把这些文件当作敏感信息(它们控制对你助手的访问)。
2) Node 设备 Pairing(iOS/Android/macOS/无头 Node)
Node 以 role: node 的设备身份连接到 Gateway。Gateway 会创建一个必须被批准的设备 Pairing 请求。
批准 Node 设备
openclaw devices list
openclaw devices approve <requestId>
openclaw devices reject <requestId>
状态存储位置
存储在 ~/.openclaw/devices/ 下:
pending.json(短期;待处理请求会过期)paired.json(已配对设备 + token)
注意事项
- 旧版
node.pair.*API(CLI:openclaw nodes pending/approve)是一个独立的 Gateway 拥有的 Pairing 存储。WS Node 仍然需要设备 Pairing。