Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jihvijhojhviihogyuvi/whatsapp-api/llms.txt
Use this file to discover all available pages before exploring further.
GET /qr is a browser-friendly alternative to phone-number pairing. Instead of returning JSON, it serves a self-contained HTML page that renders the current WhatsApp Web QR code as an image and refreshes itself every 5 seconds. This makes it easy to authenticate on any machine where you have access to both the server and a web browser — just open the URL, scan the code with your phone, and the page will reflect the new ready state on its next refresh.
Endpoint
text/html, not application/json.
Behavior
The server generates the HTML page dynamically on each request:- If a QR code is available (
has_qr: true), it is rendered as a360×360PNG image embedded in the page as a base64 data URL (<img src="data:image/png;base64,..."/>). - If no QR code is available yet (client not started or already authenticated), the page shows the message: “No QR is available yet. Start auth, then refresh this page.”
- The current
statevalue from the WhatsApp client is displayed below the image so you can monitor progress without a separate API call. - A
<meta http-equiv="refresh" content="5">tag causes the browser to reload the page every 5 seconds automatically.
How to Use
Start the server
Make sure the WhatsApp MCP API server is running and reachable at
http://127.0.0.1:8790.Start the authentication flow
Call Wait for the response to show
POST /api/auth/start to launch Chrome and begin WhatsApp Web initialization:state: "qr" or poll GET /api/status until has_qr becomes true.Open the QR page in a browser
Navigate to the QR page in any web browser on the same machine (or any machine with network access to the server):The QR code image will appear on the page.
Scan the QR code with WhatsApp
On your phone, open WhatsApp and go to Settings → Linked devices → Link a device. Point the camera at the QR code displayed in your browser.
WhatsApp QR codes expire after a short period. If the code expires before you scan it, the server automatically generates a new one. Because the page refreshes every 5 seconds, a fresh QR code will appear within seconds — no manual action is needed.