SMS HTTP API Documentation
In this document, we will describe our HTTP SMS API platform. It is used either via HTTP POST or GET
requests. It can be used directly or through any programming language allowing developers or users to
interface their system easily with Bdinfosys services.
Bdinfosys SMS Gateway Platform
What is HTTP?
The Hypertext Transfer Protocol (HTTP) is the most common networking protocol used by all Web applications. HTTP is the foundation of data communication for the World Wide Web. It is based on
requests for resources made with URLs and responses to them. The requests are made by clients (e.g.
Web Browsers) and the responses are delivered by Servers (e.g. Website). Let us describe some basic
terminology of the HTTP Protocol-
URL: A Uniform Resource Locator specifies where an identified resource is available and the mechanism
for retrieving it. That is the address of the resource.
Here the URL is ‘http://www.bdinfosys.com/sms-api/’
Parameters: The parameters supplied to the URL. These begin at the end of the resource with the
character ‘?’ and are separated by character ‘&’.
e.g. http://<ip or domain>/?paramA=1¶mB=testvalue
Here the parameters are paramA with the value of ‘1’ and paramB with the value of ‘testvalue’.
In order to make an HTTP GET call, you can use any programming language since they all offer a
function to make HTTP GET requests.
In PHP you can execute the following:
e.g. echo file_get_contents(“http://…..”);
In a UNIX shell you can execute the following command (if libcurl is installed):
e.g. curl ‘http://….’
SMS SUBMISSION WITH THE HTTP API REQUEST
To send a HTTP request you must provide the correct URL with the required parameters for a successful
SMS submission. An example HTTP GET request is:
Note: IPADDRESS, username and password are provided to users by us by email.
username and password are needed for user identification. Since HTTP Protocol is stateless, users are
required to submit this information with in all HTTP API SMS Submission requests.
Username: Your username (or your email account)
Password: Your password
Phone: e.g. 880XXXXXXXXXX
The full international number of the recipient’s mobile device. This excludes the leading ‘+’. Can accept multiple numbers by separating each number with a comma (for example: 880xxxxxxxxx, 880xxxxxxxxxxx). Due to limitations of the HTTP GET request, up to roughly 300 recipients can be send in any HTTP GET request.
msgtext: e.g. Hello+World
The text of the SMS message. You can send up to 160 characters max.
originator: The Sender ID (e.g. bdinfosys)
Originator is the sender displayed in the recipient’s mobile device upon arrival of the SMS. Can be composed of 11 alphanumeric characters (A-z, 0-9) or 14 numeric characters (0-9). White spaces and characters are not allowed.
showDLR: e.g. showDLR=1 (Default 0)
This is the optional parameter. Set this parameter to ‘1’ for requesting delivery report for this SMS.
showCOST: e.g. showCOST=1 (Default 0) Set this parameter to ‘1’ for requesting cost for this SMS.
msgtype: e.g. ‘F’ (Default ‘G’) Set this parameter with ‘F’ to send SMS as Flash. (Optional Param)
futuredate: e.g. 2013-06-17 18:45:32 Set this parameter with the exact date (in UTC) that the
SMS should be sent. Must be URL encoded e.g. futuredate=2013-06-30+11%3A49%3A45
expirationdate: e.g. 2013-12-17 12:14:01 Set this parameter with an exact date (in UTC). Expiration Date must be at least 30 minutes before the submission date or the future date. Must also be UR encoded e.g. expirationdate=2011-06-30+11%3A49%3A45
Error Codes (ERROR # Description)
ERROR100 Temporary Internal Server Error. Try again later
ERROR101 Authentication Error (Not valid login Information)
ERROR102 No credits available
ERROR103 MSIDSN (phone parameter) is invalid or prefix is not supported
ERROR104 Tariff Error
ERROR105 You are not allowed to send to that destination/country
ERROR106 Not Valid Route number or you are not allowed to use this route
ERROR107 No proper Authentication (IP restriction is activated)
ERROR108 You have no permission to send messages through HTTP API
ERROR109 Not Valid Originator
ERROR110 You are not allowed to send (Routing not available) or Reseller is trying to send while
ERROR111 Invalid Expiration date or Expiration Date is less than 30 minutes than the date of SMS
ERROR999 Invalid HTTP Request