Download Historical SMS DLR Bulk SMS API Documentation

Download Historical SMS DLR

Download Historical SMS Delivery Report

System always zips your SMS DLR of your historical SMS reports. You can download the zip format now from the API.

Application API URL:

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

 

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
date YYYY-mm-dd Specify the date for the report to download.

Save this Page on your Favorite Social Media

Sample Request Code

<?php
	$filename = 'test_2019-07-22.zip';//give filename to save locally
	$filepath = '/path/to/save/the/file/' . $filename;
	$fp = fopen($filepath, 'w+');
	$ch = curl_init("https://www.smsgateway.center/library/api/self/SMSDlrHistory/?userId=YourUsername&password=YourPassword&date=2019-11-13");
	curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
	curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
	curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
	curl_setopt($ch, CURLOPT_FILE, $fp);
	curl_exec($ch);
	curl_close($ch);
	fclose($fp);
	$res = (filesize($filepath) > 0) ? true : false;
	if (file_exists($filepath) && $res) {
		echo "File successfully downloaded at " . $filepath;
	}