DLR [GET/POST]: Push Delivery Report

To enable this service for your account please,

  1. Login to your OTP Portal.
  2. Go to OTP Callback URL
  3. Enter the URL where you want to receive the status updates and also check status to activate the URL or Uncheck to deactivate. When we detect that you have entered an URL and its set to active, our system will automatically push DLR Updates to the URL.

Thus, upon delivery confirmation, OTP.NG will Post Back to your own server to allow you to monitor the status of messages sent.

In order for our system to know that your URL has received the delivery notice, your page HTTP Status must be Code 200.

To ensure this please use the URL in your local browser before adding it in your account.

Example of Callback URL

The data pushed from our server is a multi-dimensional json data as seen below:

{json data}

{
"type":"dlr",
"data":[
{
"to":"234803XXXXX",
"from":"OTP",
"message":"Here is your OTP: 098765",
"cost":"3.5000",
"status":"DELIVERED",
"description":"Message delivered to phone",
"timesent":"2020-01-14 11:41:40",
"timedone":"2020-01-14 11:41:39",
"msgid":"otp_20200114_aaaaa",
"refid":"8422527090"
},
{
"to":"234903XXXXX",
"from":"OTP",
"message":"Here is your OTP: 234824",
"cost":"3.5000",
"status":"DELIVERED",
"description":"Message delivered to phone",
"timesent":"2020-01-14 11:42:50",
"timedone":"2020-01-14 11:42:55",
"msgid":"otp_20200114_bbbbb",
"refid":"8004204301"
},
{
"to":"234703XXXXX",
"from":"OTP",
"message":"Here is your OTP: 123456",
"cost":"3.5000",
"status":"UNDELIVERABLE",
"description":"Message delivered to phone",
"timesent":"2020-01-14 11:43:05",
"timedone":"2020-01-14 11:43:09",
"msgid":"otp_20200114_ccccc",
"refid":"7531365355"
}
]
}



Processing Returned Value

<?php
if (getenv('REQUEST_METHOD') == 'POST') {
  $data = file_get_contents("php://input");
  if (!empty($data)) {
    $results = json_decode(file_get_contents($data), true);
    foreach ($results as $r) {
      //Do whatever you want with the results here   
    }
  }
}

?>
 
Tags
Image

A system generated One-Time-Password is quite secure than a static password, especially a user-created password, which is typically weak. OTP as the name suggest, is valid only for one interaction, session, or transaction.