Académique Documents
Professionnel Documents
Culture Documents
Version 1.4
Sending Message Via HTTP API
INTRODUCTION
This HTTP API document will help you use the push platform to send SMS messages through
Query String over HTTP/HTTPS.
The HTTP API can be used to send various types of SMS messages including normal text
messages, flash messages, unicode messages, etc.
The delivery reports and credit balances can be checked using various parameters mentioned in
this document.
All the required parameters and links to the URL along with illustrations are given below.
Sample Value
sendsms.php
http://<domainname>/sendsms.php
username
&username=test
password
&password=pass123
sender
&sender= Default
mobile
&mobile=99xxxxxxxx
message
Message to be sent
&message=Test Message
route
Excel Plug-in:
Excel plug-in enables you to send your campaign directly from the excel sheet containing
mobile numbers & Variable data can be fetched from the sheet.
Prerequisites:
1. High Speed internet connection.
2. Latest version of java must be installed on Machine.
3. Excel plug-in is compatible with all version of Microsoft office, MS Office
must be installed on the machine.
4. Winrar must be installed on machine to extract setup file.
7. Click on Add-ins, It will ask for your login credentials provided by your
SMS service provider.
8. After login, read instructions given on the same & enjoy sending campaign
directly from your excel sheet.
Method-2
Dim URL As String = "http://domainname.com/sendsms.php?username=user&password=pwd&sender=SENDER&mobile" &
MOBILE & "&message=" & Message & "&route=T"
WebRequest = Net.HttpWebRequest.Create(URL) 'Hit URL Link
WebRequest.Timeout = 25000
Try
WebResonse = WebRequest.GetResponse 'Get Response
Dim reader As IO.StreamReader = New
IO.StreamReader(WebResonse.GetResponseStream)
'Read Response and store in variable
WebResponseString = reader.ReadToEnd()
WebResonse.Close()
Catch ex As Exception
WebResponseString = "Request Timeout" 'If any exception occur.
End Try
End Sub
Method-3
public static void SendSingleSMS(string message, string mobileNo)
{
try
{
// Set as per y API
string username = "888888";
string password = "88888";
string senderid = "USER";
string domian = "domainname.com";
string result = apicall("http://" + domian + "/sendsms.php?username=" + username +"&password=" + password
+ "&senderid=" + senderid + "&number=" + mobileNo + "&message=" + message + "");
if (result == "Message Sent")
{
}
}
catch
{
//x = 0;
}
}
}
catch (Exception ex)
{
return "0";
}
}
Method-4For PHP
function sendsms($number,$msg)
{
$domain="";//set your domain here
$username="";//set your username here
$password="";//set your password here
$route="";//set your route here
$sender="";//set your sender id here
$url="http://$domain/sendsms.php?username=$username&password=$password&sender=$send
er&mobile=".urlencode($number)."&message=".urlencode($msg)."&route=$route";
$aa=file_get_contents($url);
}
sendsms($number,$message);//pass mobile number and sms content here in variables $number
& $message respectively