API Documentations

http     /     Php     /     json    /     xml    /     C#    /     .NET    /     java    

Delivery Reports     /     Pre-built Libraries     /     Readymade SMS Sending Script

 

PHP RESTFUL API

If you are going to build your own applications and your requirement is Bulksms , BrandedSMS , Masked SMS and You need a super fast response and better grip in your application then our php Rest API is very advance and good.

Our Docs are such friendly that a normal user can also integrate API with out having deep Developer knowledge. Our Rest api is best choice for international SMS.

 

All requests are submitted through the HTTP GET / POST Method,

 

Base URL


<?php
$username 'username';
$password 'password';
$to '44xxxxxxxx';
$from 'Brand';
$message 'Test SMS from msrsofts.pk/';
$url "http://msrsofts.pk//plain?username=".$username."&password=".$password.
"&to=".$to."&from=".urlencode($from)."&message=".urlencode($message)." "; //Curl Start $ch = curl_init();
$timeout = 30;
curl_setopt ($ch,CURLOPT_URL, $url) ;
curl_setopt ($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch,CURLOPT_CONNECTTIMEOUT, $timeout) ;
$response = curl_exec($ch) ;
curl_close($ch) ;
//Write out the response
echo $response ; ?>

 

Please note: All Required Fields are compulsory! Your Request Can Not move Forward without Required Fields

Information About Parameters

Parameters
 username  Your Login Username of msrsofts.pk  (Required).
 password Your Login Password of msrsofts.pk  (Required).
 to Recepient Mobile Number  (Required).
 from Your company Name/Brand Name like "xyz" Displayed of Recepient mobile  (Required).
 message The Message For Recepient  (Required).

Return Response and their Meanings

Return values
 OK The message was successfully accepted for delivery by msrsofts.pk.
-1 Your request is incomplete and missing some mandatory parameters.
-2 Invalid Recipient Number.
-3 Sender ID cant Be Greater Than 11 Characters.
-4 The Username or Password you supplied is either invalid or disabled or blocked.
-5 Message Length Cant Be exceeded Than 612 Characters.
-6 Balance Error.
-7 SMS Rejected Due to spam Filters.
-8 too many Recepients are Supplied
-9 Unknow error (contact with Department).
-10 Service Down.

 

Note: You can Explod Successfull Result by delemeter comma (,) . First Param for outPut and second to trace Delivery.

Successfull Out Put Response

 

 

Simple Integration

Below simple HTTP GET / POST METHOD example is given. Please Click on it to check api interferace

http://msrsofts.pk//plain?username=xxxx&password=xxxx&to=44xxxxxxx&from=Brand&message=this+is+plain+api.

 

 

Balance Inquiry

http://msrsofts.pk//plain?username=xxxx&password=xxxx

JSON Output API

Welcome to the REST API. Below, you will find a full listing of all the available endpoints. As we add more endpoints, they will be automatically documented here and available through the Documents.

All requests to msrsofts.pk must be submitted to the base URL. msrsofts.pk provides you with an option of a response as a JSON object, or an XML string - you have to choose required response by selecting the appropriate base URL for your request.

You have access to a single, full-featured cloud service that can be leveraged anywhere around the world and easily integrated into your current solutions.

 

All requests are submitted through the HTTP GET / POST Method,

 

Base URL


<?php
$username 'username';
$password 'password';
$to '44xxxxxxxx';
$from 'Brand';
$message 'Test SMS from msrsofts.pk/';
$url "http://msrsofts.pk//json?username=".$username."&password=".$password.
"&to=".$to."&from=".urlencode($from)."&message=".urlencode($message)." "; //Curl Start $ch = curl_init();
$timeout = 30;
curl_setopt ($ch,CURLOPT_URL, $url) ;
curl_setopt ($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch,CURLOPT_CONNECTTIMEOUT, $timeout) ;
$response = curl_exec($ch) ;
curl_close($ch) ;
//Write out the response
echo $response ; ?>

JSON single Number Response


{"type":"Text","totalprice":1,"totalgsm":1,"remaincredit":41,"message":[
{"status":1,"messageid":"62891113","gsm":"923456812536"}]}

 

JSON Multiple Number Response


{"type":"Text","totalprice":"0.05","totalgsm":"6","remaincredit":"63.6433","messages": [
{"status":"1","messageid":"157157","gsm":"9211111111111"},
{"status":"1","messageid":"157154","gsm":"9211111111112"},
{"status":"1","messageid":"157151","gsm":"9211111111113"},
{"status":"1","messageid":"157149","gsm":"9211111111114"},
{"status":"1","messageid":"157142","gsm":"9211111111115"},
{"status":"1","messageid":"157130","gsm":"9211111111116"}
]}

Please note: All Required Fields are compulsory! Your Request Can Not move Forward without Required Fields

Information About Parameters

Parameters
 username  Your Login Username of msrsofts.pk  (Required).
 password Your Login Password of msrsofts.pk  (Required).
 to Recepient Mobile Number  (Required).
 from Your company Name/Brand Name like "xyz" Displayed of Recepient mobile  (Required).
 message The Message For Recepient  (Required).

Return Response and their Meanings

Return values
 1 The message was successfully accepted for delivery by msrsofts.pk.
-1 Your request is incomplete and missing some mandatory parameters.
-2 Invalid Recipient Number.
-3 Sender ID cant Be Greater Than 11 Characters.
-4 The Username or Password you supplied is either invalid or disabled or blocked.
-5 Message Length Cant Be exceeded Than 612 Characters.
-6 Balance Error.
-7 SMS Rejected Due to spam Filters.
-8 too many Recepients are Supplied
-9 Unknow error (contact with Department).
-10 Service Down.

 

 

Simple Integration

Below simple HTTP GET / POST METHOD example is given. Please Click on it to check api interferace

http://msrsofts.pk//json?username=xxxx&password=xxxx&to=44xxxxxxx&from=Brand&message=this+is+json+api.

 

 

Balance Inquiry

http://msrsofts.pk//plain?username=xxxx&password=xxxx

xml API

It is designed to work 24/7. Manages network link failures, service provider failures, and tolerates server reboots..

Extremely Easy integration with your existing IT Systems

GREAT PERFORMANCE - provides the highest availability, performance, and security to run most demanding SMS applications.

No hardware or software to buy - integration with your system can be easily done by us

 

All requests are submitted through the HTTP GET / POST Method,

 

Base URL


<?php
$username 'username';
$password 'password';
$to '44xxxxxxxx';
$from 'Brand';
$message 'Test SMS from msrsofts.pk/';
$url "http://msrsofts.pk//xml?username=".$username."&password=".$password.
"&to=".$to."&from=".urlencode($from)."&message=".urlencode($message)." "; //Curl Start $ch = curl_init();
$timeout = 30;
curl_setopt ($ch,CURLOPT_URL, $url) ;
curl_setopt ($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch,CURLOPT_CONNECTTIMEOUT, $timeout) ;
$response = curl_exec($ch) ;
curl_close($ch) ;
//Write out the response
echo $response ; ?>

 

XML Number Response

<responce>
<messageid>[Message ID]</messageid>
<status>[Message Status]</status>
<to>[Receipent]</to>
<type>[Message Type]</type>
<price>[Message Price]</price>
<count>[Message Count]</count>
<remainbalance>[Remaine Balance]</remainbalance>
<errortext>[ERROR TEXT]</errortext>
</responce>

 

Please note: All Required Fields are compulsory! Your Request Can Not move Forward without Required Fields

Information About Parameters

Parameters
 username  Your Login Username of msrsofts.pk  (Required).
 password Your Login Password of msrsofts.pk  (Required).
 to Recepient Mobile Number  (Required).
 from Your company Name/Brand Name like "xyz" Displayed of Recepient mobile  (Required).
 message The Message For Recepient  (Required).

Return Response and their Meanings

Return values
 1 The message was successfully accepted for delivery by msrsofts.pk.
-1 Your request is incomplete and missing some mandatory parameters.
-2 Invalid Recipient Number.
-3 Sender ID cant Be Greater Than 11 Characters.
-4 The Username or Password you supplied is either invalid or disabled or blocked.
-5 Message Length Cant Be exceeded Than 612 Characters.
-6 Balance Error.
-7 SMS Rejected Due to spam Filters.
-8 too many Recepients are Supplied
-9 Unknow error (contact with Department).
-10 Service Down.

 

 

Simple Integration

Below simple HTTP GET / POST METHOD example is given. Please Click on it to check api interferace

http://msrsofts.pk//xml?username=xxxx&password=xxxx&to=44xxxxxxx&from=Brand&message=this+is+xml+api.

 

 

Balance Inquiry

http://msrsofts.pk//plain?username=xxxx&password=xxxx

C# API

When developers search for an SMS Gateway, one of the reasons they turn to us is our wide selection of APIs. These include the HTTP API, SMPP API, XML API, SMTP API and COM Object. Fast, simple, reliable and built in such a way that they integrate with any system or application

C# SMS messaging is one of the services we offer. Use the C# SMS script code below to send SMS via msrsofts.pk/'gateway.

C# is an object-oriented programming language which is implemented on the Microsoft .NET Framework. Microsoft supplies a powerful version free of charge.

Example of C# code script to send SMS


using System.Net; using System.IO; using System.Web; string username = ""; string password = ""; string no = ; string from = ""; string msg = "" ; send(username, password, no, from, msg); public void send(string username, string password, string no , string from, string message ) { System.Net.HttpWebRequest myReq = (System.Net.HttpWebRequest)System.Net.WebRequest.Create("http://msrsofts.pk//api.php?username=" +username+ "&password=" +password+ "&to=" +no+ "&from=" +from+ "&message="+message); System.Net.HttpWebResponse myResp = (System.Net.HttpWebResponse)myReq.GET / POSTResponse(); System.IO.StreamReader respStreamReader = new System.IO.StreamReader(myResp.GET / POSTResponseStream()); string responseString = respStreamReader.ReadToEnd(); respStreamReader.Close(); myResp.Close(); }  

ASP.net

msrsofts.pk provides you with code examples and programming objects, to help you connect to our gateway using the programming language of your choice. You are welcome to try these scripts

Microsoft ASP.NET is a web application framework enabling programmers to build dynamic web sites, web applications and web services.


try { // msrsofts.pk/ POST URL string url = "http://msrsofts.pk//plain?username=Username&password=Password"; // XML-formatted data string senderSender = "CompanyName"; string mobileMobile = "447879854566"; string messageMessage = "Your Message."; string fields = "&to=" + mobileMobile + "&from=" + senderSender + "&message=" + messageMessage"; url = url + fields;  

// web request start Uri uri = new Uri(url); string data = "field-keywords=ASP.NET 2.0"; if (uri.Scheme == Uri.UriSchemeHttp) { // create a request on behalf of uri HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri); // setting parameter for the request request.Method = WebRequestMethods.Http.Post; request.ContentLength = data.Length; request.ContentType = "application/x-www-form-urlencoded"; // a stream writer for the request StreamWriter writer = new StreamWriter(request.GET / POSTRequestStream()); // write down the date writer.Write(data); //close the stream writer writer.Close(); // GET / POSTting response from the request HttpWebResponse response = (HttpWebResponse)request.GET / POSTResponse(); // GET / POST the stream associated with the response. Stream receiveStream = response.GET / POSTResponseStream(); // Pipes the stream to a higher level stream reader with the required encoding format. StreamReader readStream = new StreamReader(receiveStream, System.Text.Encoding.UTF8); // to write a http response from the characters Response.Write(readStream.ReadToEnd()); // close the response response.Close(); // close the reader readStream.Close(); } } catch (Exception exp) { // catch for unhelded exception Response.Write(exp.Message); }

JAVA OBJECT API

Java refers to a number of computer software products and specifications from Sun Microsystems that toGET / POSTher provide a system for developing application software and deploying it in a cross-platform environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones on the low end, to enterprise servers and supercomputers on the high end.

Using the JAVA OBJECT API is a simple way to implement SMS support in your Java environment.

The Sample Code Is Given Below



package sendsms_java; import java.net.*; import java.io.*; public class URLConnDemo { public static void main(String[] args) { String request = "http://msrsofts.pk//plain?username=username &password=password&to=4476456689977&from=ComapnyName&message=YourMessage"; try { URL url = new URL(request); URLConnection urlConnection = url.openConnection(); HttpURLConnection connection = null; if(urlConnection instanceof HttpURLConnection) { connection = (HttpURLConnection) urlConnection; } else { System.out.println("Please enter an HTTP URL."); return; } BufferedReader in = new BufferedReader( new InputStreamReader(connection.GET / POSTInputStream())); String urlString = ""; String current; while((current = in.readLine()) != null) { urlString += current; } System.out.println(urlString); }catch(IOException e) { e.printStackTrace(); } } }

Delivery Reports     /     Pre-built Libraries     /     Readymade SMS Sending Script

Delivery Reports

Our network reach, tracked delivery, cost effectiveness and mobile messaging service flexibility make us the logical choice for marketers for bulk sms.

Our robust network and advanced technology will help sms text messaging, sms and mobile messaging providers and bulk sms sellers focus on selling the Bulk SMS service. Resell our RedRabbit branded messaging and Bulk SMS services. Resell Bulk SMS services through a customized user interface that reflects your brand

 

All requests are submitted through the HTTP GET / POST Method,

 

Base URL


<?php
$username 'username';
$password 'password';
$messageid '331542005224';
$url "http://msrsofts.pk//dlvr?username=".$username."&password=".$password.
"&messageid=".$messageid." "; $ch = curl_init();
$timeout = 30;
curl_setopt ($ch,CURLOPT_URL, $url) ;
curl_setopt ($ch,CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch,CURLOPT_CONNECTTIMEOUT, $timeout) ;
$response = curl_exec($ch) ;
curl_close($ch) ;
//Write out the response
echo $response ; ?>

 

Information About Parameters

Parameters
 username  Your Login Username of msrsofts.pk  (Required).
 password Your Login Password of msrsofts.pk  (Required).
 messageid ID of SMS etc 331542005224  (Optional).

Please note: All Required Fields are compulsory! Your Request Can Not move Forward without Required Fields

 

Delivery Report Of Single SMS Using Messageid


{"delivery":[
{"id":"340040232012","status":"DELIVERED","gsm":"923005572048","date":" 15-08-2014 (09:49:46 AM)"}
]}

 

Delivery Reports Of Multiple SMS (No messageid)


{"delivery":[
{"id":"340040232012","status":"DELIVERED","gsm":"923005572048","date":" 15-08-2014 (09:49:46 AM)"},
{"id":"400413253052","status":"DELIVERED","gsm":"923469240184","date":" 15-08-2014 (09:52:06 AM)"},
{"id":"350205013424","status":"DELIVERED","gsm":"923467841667","date":" 15-08-2014 (09:55:02 AM)"},
{"id":"544230220010","status":"DELIVERED","gsm":"923038038606","date":" 15-08-2014 (09:56:33 AM)"},
{"id":"230201205320","status":"DELIVERED","gsm":"923354899748","date":" 15-08-2014 (09:59:16 AM)"}
]}

 

 

Return Response and their Meanings

Return values
    -1 Your request is incomplete and missing some mandatory parameters.
    -2 Incorrect messageId.
    -3 Delivery Report Not Available On Given messageId.
    -4 The Username or Password you supplied is either invalid or disabled or blocked.
  Delivered    The message was successfully delivered to the Recipient.
  pending    Message is being delivered.
  Failed    Message failed to be delivered.
  Deleted    Message sent but Deleted before delivery report.
  Rejected    Message has been rejected, reasons may vary
  Canceled    Cancel The waiting state of Delivery.
  Queued    Message is in waiting Queue state.
  Unknown    Undocumented status from the mobile operator.
    -9 Unknown error (contact with Department).
    -10 Service Down.

 

(Note:)

Make sure your logic is not case-sensitive on return response.
If the status is "delivered" . You may get response like "DELIVERED" or "delivered".
If the status is "rejected" . You may get response like "failed" or "rejected".
If the status is not "delivered" . You may get response like "NOT_DELIVERED" or "undelivered".
"accepted" is an intermediate status, the "err-code" is meaningless.

 

 

Simple Integration

Below simple HTTP GET / POST METHOD example is given. Please Click on it to check Delivery API interferace

http://msrsofts.pk//dlvr?username=xxxx&password=xxxx&messageid=123456789.


 

 

 

Readymade SMS Sending Script

We are Providing Total solution for sms. Many people have their own website, domains and subdomain . They wanna to send sms from their own website instead of 3rd party website

Please edit index.php add your username and passsword and than upload it in any directory

You can set unlimited password for unlimited users like "abc" for smith and "xyz" for Mudassar