This API has been deprecated. use webhook get status instead.
This is message ID you get when you send a message through API or fonnte's message history
Code for check message status through API
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.fonnte.com/status',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => array('id' => '2'),
CURLOPT_HTTPHEADER => array(
'Authorization: TOKEN'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Available parameter
- id (required) (int) - check message status by id
If you prefer to see on postman, see here.
TOKEN must be filled by your own token. See how to get token.
Ideally you should check after a period of time, ex : 5 minutes, to make sure your message is already processed, especially when you are sending multiple targets with long delay
You might find the status is
- Sent : the message is sent successfully
- Pending : the message haven't sent due to device not connected or failed to send. The message will be resend in the next minute
- Waiting : the message is on scheduled time to be sent
- Invalid : the message cannot be sent due to invalid target number
- Expired : the message will not be sent by system due to 7 days of disconnected device
- Processing : the message is on process to be sent
- Url unreachable : the message cannot be sent due to unreachable url if you are sending media
You cannot check multiple ID, use loop if you need to check multiple id.
Response
successfull response
{
"id": 2,
"message_status": "sent",
"status": true
}
- id required : require the id
{
"reason": "id required",
"status": false
}
- token invalid : token is not valid
{
"reason": "id required",
"status": false
}