SMS Delivery Report Bulk SMS API Documentation

SMS Delivery Report

View Sent SMS Delivery Report

Application API URL:

https://www.smsgateway.center/library/api/self/SMSDlr/

 

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
FromDate YYYY-mm-dd Specify the date for the report to fetch
format plain|json|xml Value for response format.

System default is plain. If you need responses in JSON or XML then you have to give value as JSON or XML.

Save this Page on your Favorite Social Media

Sample Request Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/self/SMSDlr/",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "userId=YourUsername&password=YourPassword&FromDate=2017-10-08&ToDate=2017-10-08&format=json",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/library/api/self/SMSDlr/?userId=YourUsername&password=YourPassword&FromDate=2017-10-08&ToDate=2017-10-08&format=json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "POST",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/self/SMSDlr/",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userId: 'YourUsername',
  password: 'YourPassword',
  FromDate: '2017-10-08',
  ToDate: '2017-10-08',
  format: 'json' }));
req.end();
var qs = require("querystring");
var http = require("https");

var options = {
  "method": "GET",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/library/api/self/SMSDlr/?userId=YourUsername&password=YourPassword&FromDate=2017-10-08&ToDate=2017-10-08&format=json",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({}));
req.end();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "userId=YourUsername&password=YourPassword&FromDate=2017-10-08&ToDate=2017-10-08&format=json");
Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/self/SMSDlr/")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://www.smsgateway.center/library/api/self/SMSDlr/?userId=YourUsername&password=YourPassword&FromDate=2017-10-08&ToDate=2017-10-08&format=json")
  .get()
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Response

{
  "status": "success",
  "statusCode": "900",
  "transactionId": "7057705431972731",
  "reason": "Data Fetched.",
  "noofRecords": 2,
  "DLRReport": [
		{
	      "Phone": "919999999999",
	      "TransactionId": "4981315164850372845",
	      "MessageId": "Zl4hoMD4OcWwdRZ",
	      "Type": "text",
	      "SenderId": "SMSGAT",
	      "MessageLength": "82",
	      "MessageCost": "1",
	      "ReceivedTime": "2019-07-21 20:03:03",
	      "Status": "FAILED",
	      "Cause": "UNKNOWN USER",
	      "Message": "Hello, You can shop at SMS Gateway Center at 10% discount. Coupon code is SGC20OFF",
	      "DeliveryTime": "2019-07-21 20:03:03",
	      "Circle": "Delhi",
	      "Operator": "Vodafone"
	    },
	    {
	      "Phone": "919999999999",
	      "TransactionId": "3570180419260727938",
	      "MessageId": "jOlvLDlJV54wou4",
	      "Type": "text",
	      "SenderId": "SMSGAT",
	      "MessageLength": "82",
	      "MessageCost": "1",
	      "ReceivedTime": "2019-07-21 20:04:04",
	      "Status": "FAILED",
	      "Cause": "UNKNOWN USER",
	      "Message": "Hello, You can shop at SMS Gateway Center at 10% discount. Coupon code is SGC20OFF",
	      "DeliveryTime": "2019-07-21 20:04:04",
	      "Circle": "Delhi",
	      "Operator": "Vodafone"
	    }
  ]
}
<?xml version="1.0" encoding="UTF-8"?>
<SmsGateway>
    <status>success</status>
    <statusCode>900</statusCode>
    <reason>Data Fetched.</reason>
    <transactionId>83f7a0ba-e41b-42bd-a418-0bc988208ce4</transactionId>
    <smsdlr>
        <Mobile>91961xxxxxxx</Mobile>
        <Sendername>SGCSMS</Sendername>
        <ReceivedTime>2017-10-08 18:08:28</ReceivedTime>
        <Status>DELIVERED</Status>
        <Cause>Delivered</Cause>
        <SmsMessage></SmsMessage>
        <TransId>53504db8-cc44-44d7-8db7-bc3ddda457c5</TransId>
        <MessageId>r6wvqxDL62VPkjy</MessageId>
        <Length>8</Length>
        <Cost>1</Cost>
        <SmsMessage></SmsMessage>
        <SentTime>2017-10-08 18:08:00</SentTime>
    </smsdlr>
    <smsdlr>
        <Mobile>91961xxxxxxx</Mobile>
        <Sendername>SGCSMS</Sendername>
        <ReceivedTime>2017-10-08 18:08:43</ReceivedTime>
        <Status>DELIVERED</Status>
        <Cause>Delivered</Cause>
        <SmsMessage></SmsMessage>
        <TransId>a29f07ad-e258-4156-abdc-03b6340578f8</TransId>
        <MessageId>UFcqE0UXWWEggq5</MessageId>
        <Length>8</Length>
        <Cost>1</Cost>
        <SmsMessage></SmsMessage>
        <SentTime>2017-10-08 18:08:00</SentTime>
    </smsdlr>
</SmsGateway>
Mobile, Sendername, Received Time,Status, Cause, Message, TransId, msgId, Length, Cost,Delivered Time
<br>91961xxxxxxx,SGCSMS,2017-10-08 18:08:28,DELIVERED,Delivered,test sms,53504db8-cc44-44d7-8db7-bc3ddda457c5,r6wvqxDL62VPkjy,8,1,2017-10-08 18:08:00
<br>91961xxxxxxx,SGCSMS,2017-10-08 18:08:43,DELIVERED,Delivered,test sms,a29f07ad-e258-4156-abdc-03b6340578f8,UFcqE0UXWWEggq5,8,1,2017-10-08 18:08:00