WhatsApp channels pair through a QR code. When you create a link, the channels service opens a websocket and streams a QR code. The user scans it with WhatsApp’s linked-devices feature, and a route is established between their WhatsApp account and your agent.
1. Create link → sdk.channels.link("whatsapp", input)2. Open websocket → action.socket3. Display QR → render the QR frames from the socket4. User scans → phone → Linked Devices → Scan5. Route established → messages forwarded to agent
The action.type is "websocket" for WhatsApp. Connect to action.socket and render each incoming QR frame. When the user scans the code, the socket confirms pairing and the route goes live.
const status = await sdk.channels.status("whatsapp", { userAddress: "0xYourWallet", agentWallet: "0xa7abfd271130c3ee5c8f8862a123f3697e75af0d",});console.log(status.connected); // true when a route existsconsole.log(status.routes); // array of active routes