Starts the connection via whatsmeow. With no parameters, generates a QR code. With ?number=..., generates a pairing code (8 characters). Blocks until a code or error is received (internal timeout ~60s).
Passing ?number=5511999999999, the server forces login via an 8-character pairing code instead of QR, useful when the user doesn’t have access to a camera to scan.
curl -X GET "https://ryzeapi.cloud/api/instance/connect/my-instance?number=5511999999999" \ -H "token: $Token_Instance"
Requests the last 7 days of messages on the first pairing via ?history=7. The presence of the parameter forces synchronization even if disableHistorySync=true is in the instance settings.
curl -X GET "https://ryzeapi.cloud/api/instance/connect/my-instance?history=7" \ -H "token: $Token_Instance"
Pairing code: no camera needed. The user types the 8 characters in WhatsApp under Linked Devices > Link a Device > Link with phone number.
Requests the last N days of history on the first pairing (e.g., ?history=5). Requires WhatsApp server support, not guaranteed. The presence of the parameter forces synchronization even if disableHistorySync=true in the settings.
The QR expires, WhatsApp issues a new QR after ~20s. If the user takes too long and you need another attempt, redo the call.
Pairing code is not reusable. If the user gets it wrong, redo the request to generate a new one.
After calling connect, poll GET /api/instance/list?instanceName=<name> to detect when the state becomes connected. Webhook/WebSocket notify in real time via the instance.state event.