Introduction
This API provides a robust interface for integrating WhatsApp messaging capabilities into your applications. Built on WhatsApp Web's infrastructure, it enables automated message sending, media sharing, and chat management.
Authentication
Authentication is handled through WhatsApp Web's QR code scanning mechanism. Follow these steps:
- Request the QR code from the
/qr-code
endpoint - Scan the QR code using your WhatsApp mobile app
- Wait for the authentication confirmation
Get Authentication QR Code
GET /qr-codeReturns: PNG image of the QR code
Sending Messages
Send Text Message
POST /send-messageParameter | Type | Required | Description |
---|---|---|---|
number | string | Yes | Recipient's phone number (with country code) |
message | string | Yes | Message content to send |
{
"number": "1234567890",
"message": "Hello from the API!"
}
Media Handling
Send Media File
POST /send-mediaParameter | Type | Required | Description |
---|---|---|---|
number | string | Yes | Recipient's phone number |
file | file | Yes | Media file to send |
caption | string | No | Optional caption for the media |
Connection Status
Check Connection Status
GET /status
{
"status": "connected",
"info": {
"pushname": "User Name",
"wid": "1234567890@c.us"
}
}
Managing Chats
Get All Chats
GET /chatsReturns an array of chat objects containing chat information and messages.