Pairing
ペアリング機構の概要:DM の送信者承認と、参加できるノード(デバイス)の承認。
「Pairing」は OpenClaw における明示的な **オーナー承認** ステップです。 主に次の 2 つの用途で使われます:
1. **DM ペアリング**:bot/アシスタントに話しかけられる相手の承認
2. **ノードペアリング**:Gateway ネットワークに参加できるデバイス/ノードの承認
セキュリティ背景は Security を参照してください。
1) DM ペアリング(受信チャットのアクセス制御)
チャネルのプライベートチャットポリシー(DM ポリシー)が `pairing` の場合、未知の送信者には短いコードが返ります。承認するまでメッセージは **処理されません**。
既定の DM ポリシー:Security
ペアリングコードのルール:
- 8-character string, all uppercase, excluding ambiguous characters (`0O1I`).
- **有効期限は 1 時間**。bot は新規リクエスト作成時のみペアリングメッセージを送信します(通常、送信者ごとに最大 1 回/時)。
- 既定の上限はチャネルごとに **保留 3 件**。期限切れか承認されるまで、以降のリクエストは無視されます。
送信者を承認する
openclaw pairing list telegram openclaw pairing approve telegram '<CODE>'
対応チャネル:`telegram`、`whatsapp`、`signal`、`imessage`、`discord`、`slack`。
状態はどこに保存される?
Saved under `~/.openclaw/credentials/`:
- Pending requests: `<code1>'<channel>-pairing.json</code1>`
- Approved allowlist: `<code2>'<channel>-allowFrom.json</code2>`
これらのファイルは「誰があなたのアシスタントにアクセスできるか」を決めます。機微情報として保護してください。
2) ノード(デバイス)ペアリング(iOS/Android/macOS/ヘッドレス)
Nodes connect to the Gateway as **devices** with `role: node`. The Gateway creates a device pairing request that must be approved by you.
ノード(デバイス)を承認する
openclaw devices list openclaw devices approve '<requestId>' openclaw devices reject '<requestId>'
状態はどこに保存される?
Saved under `~/.openclaw/devices/`:
- `pending.json` (transient file; pending requests expire)
- `paired.json` (paired devices and their tokens)
Notes
旧 `node.pair.*` API(CLI:`openclaw nodes pending/approve`)は、Gateway が管理する別のペアリング保存領域を使用します。WS ノードは引き続きデバイスペアリングが必要です。