Sms Country HTTP API
Sms Country HTTP API
1. INTRODUCTION
This document is to provide help and illustrations to users who wish to delivery SMS using the SMSCountry SMS Gateway via the HTTP Protocol.
Accessing gateway through HTTP API is one of the best and the quickest ways to deliver SMS messages. The HTTP API can be used to send various types of SMS messages including normal text messages, Unicode messages, ring tones, logos and picture messages.
This document gives a detailed explanation of using the gateway through HTTP API.
2. PARAMETER DEFINITION
The following table gives the list of parameters required for sending message through SMSCountrys Gateway using the HTTP API.
S.NO
PARAMETER NAME User Passwd Sid Mobilenumber Message Mtype DR SMS_Job_NO mno_msg
PARAMETER VALUE
PARAMETER DESCRIPTION User name of the account Password of the account Sender id Destination Mobile Number Message to be sent Type of message Delivery report required
1 2 3 4 5 6 7 8 9
Test User Test Password SMSCountry(default) Mobile Number Test Message N/OL/R/P/L/F/WP/LS Y/N Message Id
SMS Submitted Return value <mobileMobile Number and number1>^<message1>~<mobile- message pattern for number2>^<message2> multiple sms API
MESSAGE: - MSG
The msg parameter refers to the actual message that is to be sent to the destination mobile number. The format of the message differs depending on the type of message being sent. For simple text messages, the message can contain numbers, alphabets, spaces and certain special characters. The message can contain a maximum of 160 characters, including spaces.
In case of Unicode messaging, the message can contain only numbers in the form of Unicode digits. Further, it can have a maximum of 70 characters i.e. 70 x 4 Unicode digits for each character that means 280 digits.
In case of binary messaging, the message can contain only valid 8-bit data string. The binary message can be a maximum of 140 characters only for each SMS. However, Ring tones, Logos and Pictures that exceed 140 characters can be sent as two / three SMS messages.
S.NO 1 2 3 4
CHARACTER & + % #
5 = %3D 6 ^ %5E 7 ~ %7E Table 2.2: Special Character Hexa Decimal Encodings MESSAGE TYPE: - MTYPE
Message Type is to identify the type of message being sent. The default value of message type is N, which refers to Normal text message. SMSCountrys Gateway classifies the type of messages to be sent on the basis of this parameter and pushes them accordingly.
S.NO 1 2 3 4 5 6
MTYPE N OL P L F WP
DESCRIPTION Normal Text Message Unicode Message(eg: Arabic, Chinese, Greek , etc) Picture Message LOGO Flash WapPush ( specify the Wap URL in the parameter WAP_URL ) Long SMS (GPRS based) Ringtone
An Optional IP validation feature is also available for security of clients who access the gateway via a Global Static IP.
http://api.smscountry.com/SMSCwebservice_bulk.aspx? mobilenumber=xxxxxxxxxx&message=xxxxxxxxx&sid=xxxxxxxx&mtype=N&DR=Y
3.2 Bulk Messaging For sending Bulk SMS messages, the following URL, along with the required parameters, needs to be accessed
http://api.smscountry.com/SMSCwebservice_bulk.aspx? User=xxxxxx&passwd=xxxxxxxxx&mobilenumber=xxxxxxx,xxxxxxx,xxxxxxxxx&message=xx xxxxxxx&sid=xxxxxxxx&mtype=N&DR=Y
3.3 Sending Multiple Messages to Multiple Mobile numbers (Customized SMS) For sending different messages to different mobile numbers in a single call, please use below URL along with required parameters:http://api.smscountry.com/SMSCWebservice_MultiMessages.asp? User=xxxxxx&passwd=xxxxxxxxx&mno_msg=xxxxxxx^yyyyyyyy~xxxxxxx^yyyyyyy&sid=xx xxxxxx&mtype=N&DR=Y
4 REPORTS
4.1 Customer Status Report
Each user can check his / her account status (Credits Purchased, Credits Available, etc.) online by login into SMScountry account using the user name and password
4.2 Delivery Reports 4.2.1 Accessing Delivery Report with Time Duration
For accessing delivery report for SMS messages sent during a particular date and time duration, the following URL, along with the required parameters, needs to be accessed http://api.smscountry.com/smscwebservices_bulk_reports.aspx? user=xxxx&passwd=xxxx&fromdate=DD/MM/YYYY 00:00:00 &todate=DD/MM/YYYY 23:59:59
Response: - jobid~mobilenumber~messagestatus~donestamp~message_text~receivestamp# Sample Response: - 123456~919985111111~2~1/1/2008 11:30PM~test sms~1/1/2008 11:29PM
To get auto delivery response push at your end you need to provide us a URL that shall read below parameters from query string.
jobno (ex:- xxxxxx) , mobilenumber (ex:- 91923XXXXXXX) status (ex:- integer value, please refer API doc for status details doneTime (ex:-format MM/DD/YYYY HH:MM:SS AM/PM) messagepart (ex:- sms message sent by you)
The table below describes the various types of response from the gateway
RESPONSE
a)SMS message(s) sent (If DR=N) b) Unique Number (If DR=Y) a) Invalid User Name!! b) Your Account not activated. Please contact Webmaster!! c) Invalid Password!! d) Invalid Data e) Insufficient Balance!!! Please Buy SMS Credits f) Invalid mobile number(s) given g)SMS message(s) not sent h)Mobile number has opted not to receive any sms a) Mobile_Number-Status-TimeStamp Description for Status_ 0-Message In Queue 1 - Submitted To Carrier 2 - Un Delivered 3 Delivered 4 Expired 8 Rejected 9 Message Sent 10 Opted Out Mobile Number 11 Invalid Mobile Number a) Invalid User Name!! b) Invalid Password!!
gsmscountry&sid=wworks&mtype=N
6.2 SMS containing Unicode message (UCS-2) This is basically used to support languages with characters not included in default GSM 7-bit character set .
Find below an illustration url for sending a message in Arabic http://api.smscountry.com/SMSCwebservice_bulk.aspx? User=wworks&passwd=5hdshj3&mobilenumber=85298xxxxx&message=062A06450020062A0 633062C064A06440643002006280646062C0627062D00200641064A0020062E062F064506290 0200631063306270626064400200627064406470627062A064100&Mtype=OL
6.3 SMS containing 8-bit binary data (e.g. for Ring tone/Logo) http://api.smscountry.com/SMSCwebservice_bulk.aspx? User=wworks&passwd=5hdshj3&mobilenumber=44983xxxxxx&binmess= %06%05%04%15%81%00%00&message=%02J%3Ai%1D%BD%B1%91%19%A5%B9%9D %95%C8%04%00%25%18%C5%12a%06%19av %10%81%98%11%81%16%12%81&sid=wworks&mtype=R 6.4 SMS Containing multiple messages to multiple mobile numbers http://api.smscountry.com/SMSCWebservice_MultiMessages.asp? user=xxxxx&passwd=yyyyy&mno_msg=919xxxxxxx%5EHifirst message.%7E919xxxxxx %5Esencond sms message&DR=Y&mtype=N *The Mobile Number Prefixes seen in red
PDF to Word