Get the delivery time of a delivered message.


Parameter

Description

Required

message_idMessage IDYES
msisdnMobile numberYES


Example


curl https://api.transmitsms.com/get-sms-delivery-status.json \
  -u 2e24c1cbdd987221e165d543f34b84bf:secret \
  -d message_id=48782
  -d msisdn=61423093477


JSON Response

XML Response


{
    stats: {
	message_id: 250,
	mobile: 61423093477,
	datetime: "2017-12-24 00:00:01",
	status: "delivered"
    },
    error: {
	code: "SUCCESS",
	description: "OK"
        }
}

<?xmlversion="1.0"encoding="UTF-8"?>
<response>
  <stats>
    <message_id>250</message_id>
    <mobile>61423093477</mobile>
    <datetime>2017-12-24 00:00:01</datetime>
    <status>delivered</status>
  </stats>
  <error>
    <code>SUCCESS</code>
        <description>OK</description>
  </error>
</response>

PHP Examples


<?php
 include'../../APIClient2.php';
 $api=new transmitsmsAPI("API_KEY",'API_SECRET');
 
 $messageID=250;
 $msisdn='61423093477';
 
 $result=$api->getSmsDeliveryStatus($messageID, $msisdn);
 if($result->error->code=='SUCCESS')
 {
     echo var_export($result, true);
 }
 else
 {
     echo 'Error: '.$result->error->description;
 }
 
?>