Retrieve new status of messages from WhatsApp, so every time a new status of message is sent, we will forward it to this URL. The webhooks URL can be set on menu: Device – setting – webhook tracking.
Make sure you have a domain that can be accessed publicly as namadomain.com, then place the webhook file in the folder, so that later your webhook URL isĀ https://yourdomain.com/tracking.php
The following is the data that will be sent to your webhook URL:
POSThttps://your-domain.com/tracking.php
<?php
/**
* all data POST sent from http://app.absen.co.id
* you must create URL what can receive POST data
* we will sent data like this:
* id = message ID - string
* phone = phone number
* status = status of message - string
* device_id = device ID - string
*/
extract($_POST);
?>
Body Response:
id | string | Message ID like random string |
---|---|---|
phone | string | Telephone number of the recipient of the message |
status | string | sent, read, cancel, received, reject, pending |
device_id | string | ID your device |