This command can be used to determine the delivery status of a sent message, whether it be SMS or MMS.
https://api.txtlocal.com/status_message/
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message Details
$message_id = '123456';
// Prepare data for POST request
$data = array('apikey' => $apiKey, 'message_id' => $message_id);
// Send the POST request with cURL
$ch = curl_init('https://api.txtlocal.com/status_message/');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?><?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message Details
$message_id = '123456';
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&message_id=' . $message_id;
// Send the GET request with cURL
$ch = curl_init('https://api.txtlocal.com/status_message/?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?><?php
require('Textlocal.class.php');
$Textlocal = new Textlocal(false, false, 'your apiKey');
$message_id = 123456;
$response = $Textlocal->getMessageStatus($message_id);
print_r($response);
?>| message_id | ID of the message you'd like to check the status of. Found in the response of send_sms and send_mms. |
|---|---|
| Login Parameters (Additional Information) | |
| apiKey | You can create these in your Messenger Control Panel (click here) for each application, and limit the usage of them by host IP Address. |
{
"message":{
"id":1151895224,
"recipient":447123456789,
"type":"sms",
"status":"D",
"date":"2013-07-04 14:31:18"
},
"status":"success"
}<?xml version="1.0" encoding="UTF-8" ?> <response> <message> <id>1151895224</id> <recipient>447123456789</recipient> <type>sms</type> <status>D</status> <date>2013-07-04 14:31:18</date> </message> <status>success</status> </response>
| Error Codes | |
| 16 | No message ID specified. |
|---|---|
| 17 | Invalid message ID. |