Automate replies and process incoming WhatsApp messages using your own webhook.
When a WhatsApp message is received, and your device has a webhook URL configured:
{"reply": "..."}
JSON, it is sent as a replyHereβs what will be sent to your webhook URL:
{
"user_id": 123,
"device_id": "abc123",
"whatsapp_id": "60123456789@s.whatsapp.net",
"from": "60123456789",
"message": "Hello, I need help",
"message_id": "ABCDEF123456",
"timestamp": 1722337200
}
Field Reference:
user_id
β Your user IDdevice_id
β Your device IDwhatsapp_id
β WhatsApp sender JIDfrom
β Sender's phone numbermessage
β Text content of the messagemessage_id
β Unique message IDtimestamp
β UNIX timestampUse this sample PHP script to process incoming messages and optionally reply:
<?php
$input = file_get_contents('php://input');
$data = json_decode($input, true);
// Log to file (for development)
file_put_contents('personal_incoming.txt', date('c') . " | " . print_r($data, true), FILE_APPEND);
// Return dynamic reply
$reply = "Thanks! You said: " . $data['message'];
header('Content-Type: application/json');
echo json_encode(['reply' => $reply]);
?>
Expected Webhook Response:
{
"reply": "Thanks! Your appointment has been scheduled."
}
Set your webhook URL under your device settings in your WMS Personal Dashboard.
Create Account