Link a Device (QR)
GET /api/qr
Returns a self-refreshing HTML page (not JSON) containing a base64 PNG QR code. Open it in a browser and scan from WhatsApp → Linked devices on your phone. The page auto-refreshes every ~10s; the engine starts the session and waits up to ~15s for a QR. Once the device shows as connected, the QR is no longer needed.
There is no "create session" endpoint — devices are created in the dashboard (Add Device, which generates the Device Key). You then link the physical number by scanning this QR.
- Auth: Bearer Device Key
Request
curl https://app.rapiwa.com/api/qr \
-H "Authorization: Bearer YOUR_DEVICE_KEY"
Response — Content-Type: text/html
<!doctype html>
<html>
<head><meta http-equiv="refresh" content="10"></head>
<body>
<img src="data:image/png;base64,iVBORw0KGgo..." alt="Scan to link">
</body>
</html>
Tips
Because the response is HTML, just point a browser tab at the URL and scan — it re-polls automatically until the device links.
Related: Get Session Info · Validate Device Key