Akun Demo Anda telah Expired. Sesi Anda dibekukan dan fitur dinonaktifkan.
My Connections
Manage WhatsApp sessions and webhooks
| Session Name | Phone Number | Status | Webhook URL | AI Profile | Info | Actions |
|---|
Test Message ()
AI Agent Settings
Manage your Gemini API Keys and AI Profiles
Rincian Penggunaan Token per Failover API Key
| API KEY | STATUS SISTEM | INPUT TOKEN (PROMPT) | OUTPUT TOKEN (AI) | TOTAL TOKEN | PORSI TOKEN | ACTIONS |
|---|
AI Profiles
| Profile Name | Model | Limit History | Actions |
|---|
Knowledge Base
Manajemen Basis Pengetahuan AI (Barang & Layanan)
Data
Showing 0 items
API & Webhook Documentation
How to integrate with WA Gateway
My API Key
Click input to copy.
Use this token in the Authorization header: Bearer <API_KEY>
Send Text Message
Endpoint untuk mengirim pesan teks biasa ke nomor tujuan.
POST /api/messages/{session_name}/send-text
Request Headers:
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
Request Body:
{
"number": "08123456789", // Otomatis dikonversi menjadi 628123456789
"text": "Halo, ini pesan dari WA Gateway!"
}
Response (Success 200 OK):
{
"success": true,
"message": "Message sent successfully",
"data": {
"key": {
"remoteJid": "628123456789@s.whatsapp.net",
"fromMe": true,
"id": "BAE5XXXXXXXXXXXXXXXX"
},
"message": { "conversation": "Halo, ini pesan dari WA Gateway!" },
"messageTimestamp": 1690000000
}
}
Send Media Message
Endpoint untuk mengirim file atau gambar (berdasarkan URL) dengan *caption* opsional.
POST /api/messages/{session_name}/send-media
Request Headers:
Authorization: Bearer <YOUR_TOKEN>
Content-Type: application/json
Request Body:
{
"number": "628123456789",
"url": "https://example.com/image.jpg",
"caption": "Silakan cek gambar berikut!"
}
Response (Success 200 OK):
{
"success": true,
"message": "Media sent successfully",
"data": {
"key": {
"remoteJid": "628123456789@s.whatsapp.net",
"fromMe": true,
"id": "BAE5YYYYYYYYYYYYYYYY"
},
"message": { "imageMessage": { ... } },
"messageTimestamp": 1690000005
}
}
Webhook Event (Incoming Message)
Ketika sesi menerima pesan masuk (bukan pesan keluar/dari nomor Anda sendiri), data akan
dikirimkan ke Webhook URL Anda menggunakan metode POST.
Webhook Headers:
Content-Type: application/json
X-Webhook-Secret: <YOUR_WEBHOOK_SECRET>
HTTP_X_WEBHOOK_SECRET: <YOUR_WEBHOOK_SECRET>
Webhook Body (JSON):
{
"session": "session1", // Nama sesi yang menerima pesan
"message": {
"key": {
"remoteJid": "628123456789@s.whatsapp.net",
"fromMe": false, // False berarti pesan masuk
"id": "9BXXXXXXXXXXXXXXXXXX"
},
"message": {
"conversation": "Halo! Saya ingin bertanya."
// ATAU "extendedTextMessage": { "text": "Halo!" } (untuk pesan yang di-forward / dibalas)
},
"messageTimestamp": 1690000010,
"pushName": "Nama Pengirim"
}
}
Tips Implementasi Webhook di Server Anda (Contoh PHP)
$secret = $_SERVER['HTTP_X_WEBHOOK_SECRET'] ?? '';
if ($secret !== 'RAHASIA_SAYA_123') {
http_response_code(403);
die('Unauthorized');
}
$input = file_get_contents('php://input');
$data = json_decode($input, true);
if ($data && isset($data['message'])) {
$pengirim = $data['message']['key']['remoteJid'];
$teks = $data['message']['message']['conversation'] ?? '';
// Lakukan pemrosesan pesan (misal: simpan ke DB atau balas otomatis)
}
User Management
Create users and generate API keys
| ID | Username | Phone | Expired | Sisa Hari | Role | API Key | Actions |
|---|
Showing 0 items
PesanPintar