SMS Gateway API Documentation

OnnoRokom SMS Service (OSS) is developed to provide a handy way of sending single and bulk messages . You have the option to manage Contact list from your own client panel. Masking and nonmasking both types are supported , We are providing you the opportunity to Send SMS from Excel sheet as well as ordinary way .You can view your report and other statistics in different angles.

OnnoRokom Web Service uses Microsoft Internet Information Server to provide the underlying HTTP server functionality.

This user manual briefly describes how to use this portal.

BULK SMS API FOR DOT NET

Service overview: Service Overview

Service WSDL: Service WSDL

All Operations
Method Description
OneToOne Single Sms Send Method
OneToOneBulk Each and every number contains individual message
OneToMany Bulk Sms Method
DeliveryStatus Return Delivery Status
Return Value

Server response will be Errorcode||recipientnumber||responseId


OPERATION OVERVIEW

SEND SINGLE MESSAGE

Description : Single Sms Send

Signature: OneToOne(string userName, string userPassword, string mobileNumber, string smsText, string type, string maskName = "", string campaignName = "")

Paremeters
Input Fields Type Description
userName String User name which is used for login
userPassword String Password
mobileNumber String Valid recipient number
smsText String Text or Ucs
type String Sms Type See Below
maskName String Mask Name which is allowed to your client panel
campaignName String Campaign Name
Sms type

1 -> Text

2 -> Unicode

.Net Web Reference: For a Microsoft DOT NET project, you need to add http://api2.onnorokomsms.com/sendsms.asmx as a web reference. The following C# code shows how to call SendTextMultiMessage:

	                			
								using SmsApi.com.onnorokomsms.api;
								void SendOneToOneSingleSms()
								{
									try
									{
									var sms = new SendSms();
									string returnValue = sms.OneToOne("userName", "userPassword",
									"01841336333", "smsText", "TEXT", "MaskName","campaignName");
									}
									catch (Exception e)
									{
									throw e;
									}
								}


SEND BULK MESSAGE

Description : OneToOneBulk Sms Send

Signature : OneToOneBulk(MessageHeader messageHeader, List< WsSms> wsSmses)

Description : OneToMany Bulk Sms Send

Signature : OneToManyBulk(MessageHeader messageHeader, List< WsSms> wsSmses)

							using SmsApi.com.onnorokomsms.api;
							int count =5;
							var sms = new SendSms();
							var wSms = new WsSms();
							var messageHeader = new MessageHeader();
							messageHeader.UserName = "User Name";
							messageHeader.UserPassword = "Password";
							messageHeader.CampingName = "";
							messageHeader.MarskText = "DemoMask";
							var arrayList = new List< WsSms>();
							for (int i = 0; i < count; i++)
							{
								wSms.MobileNumber = "01841336333";
								wSms.SmsText = "Real Api Tested";
								wSms.Type = "TEXT";
								arrayList.Add(wSms);
							}
							var returnResult =sms.OneToOneBulk(messageHeader, arrayList);

	                	
Description : OneToManyBulk Sms Send

Signature : OneToMany(string userName, string userPassword, string messageText, string numberList, string smsType, string maskName = "", string campaignName = "")

								using SmsApi.com.onnorokomsms.api;
								void SendOneToManySms()
								{
									try
									{
										var sms = new SendSms();
										string returnValue = sms. OneToMany(“username”, “userPassword”,
										“messageText”, “01811444729,01841336333”, “TEXT”, "MaskName",
										"campaignName") 
									}
									catch (Exception e)
									{
										throw e;
									}
								}
	                	
BULK SMS API FOR PHP
	                		
	                		try{
									$soapClient = new SoapClient("http://api2.onnorokomsms.com/sendsms.asmx?wsdl");
									$paramArray = array(
									'userName'=>"Your User Name",
									'userPassword'=>"Your Pass",
									'mobileNumber'=> "mobile Number",
									'smsText'=>"desired Message",
									'type'=>"TEXT",
									'maskName'=> "Mask Name",
									'campaignName'=>'',
									);
									$value = $soapClient->__call("OneToOne", array($paramArray));
									} catch (dmException $e) {
									// echo $e;
							}
						
Get Delivery Status

Description : This function is for getting status info about a message using a unique identification number (MessageId) which is received from the above two methods.If your request is successfully processed then it will return a Success/Error code(which will be described below), recipient number and responseId separted by “||”. It is suggested to call this method after certain period of time .For example, after calling OneToOne(), you will get a responseId . Then after two hour, you can call DeliveryStatus using the responseId to get updated status of the message.

Signature : DeliveryStatus(String userName, string userPassword, string responseId)

Server response will be Errorcode||recipientnumber||responseId

Suppose a response from server is 1905||01841336333||17079 [see Error Code]. Means server did not count it as a valid destination number because country code is not added

Success Code for message is 1900.

Error Code :
Serial Number Error Code Descriprion
1 1901 Parameter content missing
2 1902 Invalid user/pass
3 1903 Not enough balance
4 1905 Invalid destination number
5 1906 Operator Not found
6 1907 Invalid mask Name
7 1908 Sms body too long
8 1909 Duplicate campaign Name
9 1910 Invalid message
10 1911 Too many Sms Request Please try less then 500 in one request
Delivery status Update Code
Code Description
1 Pending
2 Success
3 Canceled
4 failed

To enable you to integrate OnnoRokom Bulk SMS Service with your own applications, we also provide Developer API Service:

a) OnnoRokom SMS integration with CodeIgniter

Requirements:

1. SOAP extension on webserver Download Link

2.CodeIgniter nusoap_library (available at source forge)

Write following code at your Controller Action code block:
						
						$userName = "your user name";
						$passWord = "your user password";

						$this->load->library("Nusoap_library");
						$soapClient =  new nusoap_client("https://api2.onnorokomSMS.com/sendSMS.asmx?wsdl", 'wsdl');


						//OneToOne

						$paramArray = array(
						    'userName'=>$userName,
						    'userPassword'=>$passWord, 
						    'mobileNumber'=> "01841336333", 
						    'smsText'=>"Single SMS Send from CodeIgniter Test", 
						    'type'=>"TEXT",
						    'maskName'=> "DemoMask", 
						    'campaignName'=>'',
						);
						echo "before calling method";
						$value = $soapClient->call("OneToOne", $paramArray);            
						echo 'output is '; print_r($value);


						// One to Many 

						$paramArray = array(
						    'userName'=>$userName,
						    'userPassword'=>$passWord, 
						    'messageText'=>"Bulk SMS Send from CodeIgniter Test", 
						    'numberList'=> "01811444729,01833168163",               
						    'smsType'=>"TEXT",
						    'maskName'=> "DemoMask", 
						    'campaignName'=>'',
						);
						echo "before calling method";
						$value = $soapClient->call("OneToMany", $paramArray);           
						echo 'output is '; print_r($value);
					

You can also download from github here: Github Link

b) OnnoRokom SMS integration with VB6

Install prerequisites first then use given sample project source code.
'SmsType = "TEXT" 'SmsType = "UCS" 'For Bangla SMS

						
							Dim client As New SoapClient Dim SmsType As String
							// Check balance example
							Private Sub checkBalanceBtn_Click()
							client.mssoapinit (http://api2.onnorokomsms.com/SendSms.asmx?wsdl)
							Dim balance As Variant
							balance = client.GetBalance("your username", "your password")
							statusLbl.Caption = "Connected. Your Balance is " & balance

							End Sub
							// Bulk SMS Sending example
							Private Sub sendBulkms_Click()
							Dim rsp As Variant
							rsp = client.OneToMany(userName.Text, password.Text, smsText.Text, mobileNumbers.Text, SmsType, maskNameTxt.Text, "")
							statusLbl.Caption = rsp

							End Sub
							/// Single SMS Sending example
							Private Sub sendSingleSms_Click()
							Dim rsp As Variant
							rsp = client.OneToOne(userName.Text, password.Text, mobileNumbers.Text, smsText.Text, SmsType, maskNameTxt.Text, "")
							statusLbl.Caption = rsp
					

You can also download from github here: Github Link

N.B. : If you face any problem please contact with us. Link