Connection
Waiting
Generating QR Code…
How to connect:
- Open WhatsApp on your phone
- Tap ⋮ Menu → Linked Devices
- Tap Link a Device
- Scan the QR code above
API Key
Send as X-API-Key header or ?api_key= query param. Set WA_API_KEY in .env to change it.
Quick Message Test
Test your APIAPI Endpoints
Base:/api
Connection status & account info
Get QR code as base64 image
Send a text message
{ "to": "919876543210", "message": "Hello!" }
Send an image (multipart/form-data)
Form: to, caption (opt), file (image)
Send media from a public URL
{ "to": "...", "url": "https://...", "caption": "..." }
List all chats
Get messages from a chat
Query: ?limit=20
List all saved contacts
Logout & clear session
Code Samples
Node.jsfetch examples
// Send a plain text WhatsApp message
const response = await fetch('http://localhost:3000/api/send/message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-Key': 'YOUR_API_KEY'
},
body: JSON.stringify({
to: '919876543210', // country code + number, no +
message: 'Hello! 👋',
}),
});
const json = await response.json();
console.log(json);
// {
// success: true,
// message: 'Message sent',
// data: { messageId: 'true_91...' }
// }