Connect a WhatsApp number
connect_whatsapp_numberConnect a WhatsApp number to the user's Werify account by pairing code — no QR, no browser. Ask the user for their WhatsApp number with country code (never infer it), call this, then relay the instructions: the phone gets a WhatsApp notification to link a device, or the user opens WhatsApp → Linked devices → Link a device → Link with phone number, and types the code. The code is valid for about 2.5 minutes; if it expires, call again for a new one. Where Werify's pairing widget shows, qr: true shows a QR code to scan with the phone instead, for a user who asks to scan one.
The pairing completes on the phone, not here: confirm it with list_connected_numbers (linking → syncing → ready). A number the user had connected before and that dropped is reconnected in place (reconnecting: true) — nothing is lost. Connecting is free. Once capture_funded is true, capture can start here through list_capturable_chats and start_live_capture. A number linked to another Werify account is refused without revealing that account; the user moves it to this account in the web app. If this tool answers an error whose code is currency_selection_required, the user has not confirmed the account's currency: show them the action_url and do not retry until they say it is done.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"phone": "<phone>"
},
"name": "connect_whatsapp_number"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qr | No | Set to true to show a QR code to scan instead of a pairing code, when the user asks to scan one. Only where Werify's pairing widget shows, because the widget draws it. | |
| phone | Yes | The user's WhatsApp number with country code, e.g. "+55 11 91234-5678". Ask the user for it; never guess it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| qr | No | True when Werify's pairing widget shows a QR code to scan instead of a code. The widget reads it from list_connected_numbers as WhatsApp replaces it. | |
| phone | No | The number being connected, in international format. | |
| locale | No | The Werify account's language as a BCP 47 tag, for the widget's own text. | |
| help_url | No | A page showing the WhatsApp screens step by step, in the user's language. | |
| expires_at | No | When it stops working, as an ISO 8601 UTC timestamp. | |
| instructions | No | What to tell the user, step by step. Relay it; translate if needed. | |
| pairing_code | No | The 8-character code the user types into WhatsApp. Absent when qr is true. | |
| reconnecting | No | True when this number was connected before and is being re-paired in place. | |
| expires_in_seconds | No | How long the code, or the run of QR codes, stays valid (about 160 s). |