Dashboard
Monitor your WhatsApp Gateway activity
User
Messages Sent
0
📤 Outgoing
Messages Received
0
📥 Incoming
Active Device
None
ID: -
📱 Connected
Status
Unknown
🔌 Connection
Device Connection
Scan QR code to connect your WhatsApp
Select a device to connect
Send Message
Send text or media messages via WhatsApp
💡 Sending Tips
- Number Format: Use country code (e.g.,
6281...). No+or0in front. - Media: Use direct URLs (ending in .jpg, .mp4).
- Bulk Sending: Add delay between messages to avoid bans.
Contact Groups
Manage your contact groups for bulk messaging
| Group Name | Members | Actions |
|---|
Message Logs
No logs yet...
Full Service Manual
🛠️ Installation Guide
1. Prerequisites
- Node.js (v14 or newer)
- MySQL (e.g., via XAMPP)
2. Database Setup
- Open phpMyAdmin or MySQL CLI.
- Create a new database named
wa_gateway. - Import
database.sql.
3. Configuration
Open .env and set your credentials:
DB_HOST=localhost DB_USER=root DB_PASSWORD=your_password DB_NAME=wa_gateway JWT_SECRET=secure_secret_key
🚀 Postman Collection
Testing API becomes easy with our Postman Collection.
📥 Download Postman Collection🔌 REST API Guide
Base URL: http://localhost:3000
Auth: Authorization: Bearer <token>
1. Send Text Message
POST /api/send-message
{
"deviceId": "your-device-id",
"number": "628123456789",
"message": "Hello from API!"
}
2. Send Media Message
POST /api/send-media
{
"deviceId": "your-device-id",
"number": "628123456789",
"type": "image",
"url": "https://example.com/image.jpg",
"caption": "Check this out!"
}
💻 Code Integration Examples
🐘 PHP (cURL)
Send Text:
$ch = curl_init('http://localhost:3000/api/send-message');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'deviceId' => 'device-01',
'number' => '628...',
'message' => 'Hello'
]));
$res = curl_exec($ch);
Send Image/Video:
$ch = curl_init('http://localhost:3000/api/send-media');
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Authorization: Bearer ' . $token, 'Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode([
'deviceId' => 'device-01',
'number' => '628...',
'type' => 'image', // error 'video'
'url' => 'https://example.com/media.jpg',
'caption' => 'Media Caption'
]));
$res = curl_exec($ch);
🟨 JavaScript (Fetch)
await fetch('http://localhost:3000/api/send-message', {
method: 'POST',
headers: {
'Authorization': `Bearer ${token}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
deviceId: 'device-01',
number: '628123456789',
message: 'Hello World'
})
});
🐍 Python (Requests)
import requests
url = "http://localhost:3000/api/send-message"
headers = {"Authorization": "Bearer YOUR_TOKEN"}
payload = {
"deviceId": "device-01",
"number": "628123456789",
"message": "Hello from Python"
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
🔵 Go (Native)
import (
"bytes"
"net/http"
)
func sendMessage() {
url := "http://localhost:3000/api/send-message"
jsonStr := []byte(`{"deviceId":"id","number":"628...","message":"Hi"}`)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonStr))
req.Header.Set("Authorization", "Bearer TOKEN")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
}
☕ Java (OkHttp)
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"deviceId\":\"id\",\"number\":\"628...\",\"message\":\"Hi\"}");
Request request = new Request.Builder()
.url("http://localhost:3000/api/send-message")
.post(body)
.addHeader("Authorization", "Bearer TOKEN")
.build();
Response response = client.newCall(request).execute();
🔷 .NET (C#)
using var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", "TOKEN");
var payload = new { deviceId = "id", number = "628...", message = "Hello" };
var response = await client.PostAsJsonAsync("http://localhost:3000/api/send-message", payload);
var content = await response.Content.ReadAsStringAsync();