app

Marsooly SMS GateWay API Features

In-depth cooperation with hundreds of operators abroad, multi-protocol docking to ensure needs are met, and multiple transmission methods to easily reach the world

  • Stable and reliable SMS API platform

    The platform supports large capacity, high concurrency, distributed clustering, high availability, automatic disaster recovery mechanism, and a highly flexible and scalable network architecture.

  • SMS API Provider Flexible billing and low price

    The directly connected SMS gateway API channel is characterized by low resource prices and high efficiency. The platform has a flexible billing form that can be sent on demand and provides multiple payment methods for users to choose.

  • High quality Verification & OTP SMS Gateway with fast processing

    7x24 online service, fast response in time, help comrades achieve more.

SMS API

What can you do with Marsooly SMS GateWay API

  • Transactional SMS

    Send notifications to your customers through SMS verification API such as online payments, order tracking, appointment reminders, booking confirmations, and more.

  • Two-factor OTP SMS Gatway For account verification

    Use Marssoly OTP SMS Gateway platform to verify users and authenticate their account while logging in and verify mobile numbers by sending the activation code.

  • Delivery Status Tracking

    You can get real time delivery status reports via our sms api gateway.

SMS API Provider

Benefits of Marsooly SMS GateWay API Programmable Messaging

Make life easy for your customers with our SMS verification & OTP SMS gateway. Integrate our SMS API into your application for instant messages with low costs.

  • Global reach with enterprise reliability

  • Support for multiple channels with one platform

  • Quick to set up

  • Complete control over customer engagement

  • Multi-language support

  • Global coverage - Reach more than 95% of the world

  • Secure and reliable

SMS verification API

Fast and secure sms api

Marsooly sms api gateway is characterized by speed and security when sending messages. It is characterized by the speed of delivering messages to operators in a few seconds, as well as encrypting all the data used during the sending process.

4 step quick access

In a world where SMS has become an extension of the solutions of software and mobile application SMS API provider, choosing a strong SMS API provider with high capabilities to link with the sending gateway becomes one of the important matters to ensure the quality of integration and integration.

Participation Of SMS API Provider

An authorization key is generated automatically after you sign up in Marsooly platform

The initial setup

Support SMPP protocol, allow HTTP API interface to manage all sms api features

Docking Adjustment

Adaptation according to the simulation of the production environment, avoiding the unknown in advance

The production process

Send tasks,manage scheduing and get report of the delivery status in real time

Let’s See How It Work

Every day we help the worlds leading brands create their most engaging events with our SMS Verification API & OTP SMS Gateway.

<?php

function Authentication($username,$password)
{

$url = 'http://www.marsooly.com/api/users.aspx?code=1&username=$username&password=$password;

$ch =curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
$content = curl_exec($ch);
echo $content;

}
$username = "username here";
$password="********";
//Authentication
Authentication($username,$password);
?>

<?php

function GetSenderNames($username,$password)
{

$url = 'http://www.marsooly.com/api/users.aspx?code=8&username='$username&password=$password;

$ch =curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
$content = curl_exec($ch);
echo $content;

}
$username = "username here";
$password="********";
//Get Sender Names
GetSenderNames($username,$password);
?>

<?php

function GetBalance($username,$password)
{

$url = 'http://www.marsooly.com/api/users.aspx?code=7&username='$username&password=$password;

$ch =curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
$content = curl_exec($ch);
echo $content;

}
$username = "username here";
$password="********";
//Get Balance
GetBalance($username,$password);
?>

<?php

function send($api_token,$mobile,$message,$sender)
{

$url = 'https://www.marsooly.com/api/SendMessage.aspx?' . http_build_query(array(

'api_token' => $api_token ,

'mobile' => $mobile ,
'message' => $message ,
'sender' => $sender
)) ;

$ch = curl_init();
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL,$url);
$content = curl_exec($ch);
echo $content;

}
$username = "api_token here";
$mobile="96655xxxxxxx";
$message="تجربة ارسال";
$senderName="sender name here";
//send sms
send($api_token,$mobile,$message,$sender);
?>

/*Authentication Api */

public string Authentication(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=1&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*Get Senders Names Api */

public string GetSenderNames(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=8&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*Get Balance Api */

public string GetBalance(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=7&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*send message Api */

public string sendmessage(string api_token, string mobile, string message, string sendername)
{

string _url="https://www.marsooly.com/api/SendMessage.aspx?
string _param;
_param="api_token="+api_token+"&mobile="+mobile+"&message="+message+"&sender="+sendername;
string send_url;
send_url=_url + _param ;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( send_url ) ;
request.Method = "POST";
var data = Encoding.UTF8.GetBytes(send_url);
request.ContentLength = data.Length;
var streamwritter = request.GetRequestStream();
streamwritter.Write(data, 0, data.Length);
streamwritter.Close();

var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

'Send Message Api

Public Function Authentication ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=1&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'Get Sender Names Api

Public Function getSenderNames ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=8&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'get Balance Api

Public Function getBalance ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=7&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'Send Message Api

Public Function SendMessage ( ByVal api_token As String, ByVal mobile As String , ByVal message As String , ByVal sendername As String ) As String

Dim postData As String = ""
postData=api_token="+api_token +"&mobile="+mobile+"&message="+message+"&sender="+sendername
Dim send_url As String = "https://www.marsooly.com/api/SendMessage.aspx
Dim result As String = ""
Try

Dim encoding As UTF8Encoding
Dim byteData As Byte() = encoding.GetBytes(postData)
Dim request As HttpWebRequest = DirectCast(WebRequest.Create(send_url), HttpWebRequest )
request.Method = "POST"
request.KeepAlive = True
request.ContentLength = byteData.Length
request.ContentType = "application/x-www-form-urlencoded"
Dim postreqstream As Stream = request.GetRequestStream ()
postreqstream.Write(byteData , 0 , byteData.Length )
postreqstream.Close ()
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

<%
	username = "your username"
    password = "your password"
	
    link = "http://www.marsooly.com/api/users.aspx?"
	code = 1 
	url = link & "username=" & username & "&password=" & password & "&code=" & code 
     Dim xmlhttp
	set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
	xmlhttp.open "POST", url, false
	xmlhttp.send ""
	msg = xmlhttp.responseText
	response.write(msg)
	set xmlhttp = nothing
%>
<%
	username = "your username"
    password = "your password"
	
    link = "http://www.marsooly.com/api/users.aspx?"
	code = 8 
	url = link & "username=" & username & "&password=" & password & "&code=" & code 
     Dim xmlhttp
	set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
	xmlhttp.open "POST", url, false
	xmlhttp.send ""
	msg = xmlhttp.responseText
	response.write(msg)
	set xmlhttp = nothing
%>
<%
	username = "your username"
    password = "your password"
	
    link = "http://www.marsooly.com/api/users.aspx?"
	code = 7 
	url = link & "username=" & username & "&password=" & password & "&code=" & code 
     Dim xmlhttp
	set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
	xmlhttp.open "POST", url, false
	xmlhttp.send ""
	msg = xmlhttp.responseText
	response.write(msg)
	set xmlhttp = nothing
%>
<%
	api_token = "your api_token"
   
    link = "https://www.marsooly.com/api/SendMessage.aspx?"
	message = "your message"
	message = Server.urlencode(message)
	mobile = "9665xxxxxxxx1,9665xxxxxxxx2"
	sender = "your sender name"
	url = link & "api_token=" & api_token & "&mobile=" & mobile & "&message=" & message & "&sender=" & sender 
     Dim xmlhttp
	set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
	xmlhttp.open "POST", url, false
	xmlhttp.send ""
	msg = xmlhttp.responseText
	response.write(msg)
	set xmlhttp = nothing
%>

/*Authentication Api */

public string Authentication(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=1&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*Get Senders Names Api */

public string GetSenderNames(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=8&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*Get Balance Api */

public string GetBalance(string user_name, string pass)
{

string auth_url="https://www.marsooly.com/api/users.aspx?code=7&username="+user_name+"&password="+pass;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( auth_url ) ;
var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

/*send message Api */

public string sendmessage(string api_token, string mobile, string message, string sendername)
{

string _url="https://www.marsooly.com/api/SendMessage.aspx?
string _param;
_param="api_token="+api_token+"&mobile="+mobile+"&message="+message+"&sender="+sendername;
string send_url;
send_url=_url + _param ;
string return_value="";
try
{

var request = (HttpWebRequest ) WebRequest .Create ( send_url ) ;
request.Method = "POST";
var data = Encoding.UTF8.GetBytes(send_url);
request.ContentLength = data.Length;
var streamwritter = request.GetRequestStream();
streamwritter.Write(data, 0, data.Length);
streamwritter.Close();

var response = ( HttpWebResponse ) request .GetResponse () ;
var streamReader = new StreamReader ( response .GetResponseStream ()) ;
return_value = streamReader .ReadToEnd () .ToString () ;
streamReader .Close () ;
return return_value ;
}
catch ( Exception exc )
{
return exc .Message ;
}
finally
{
}

}

'Authentication Api

Public Function Authentication ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=1&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'Get Sender Names Api

Public Function getSenderNames ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=8&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'get Balance Api

Public Function getBalance ( ByVal user_name As String , ByVal user_name As String ) As String

Dim auth_url As String = "https://www.marsooly.com/api/users.aspx?code=7&username="+user_name+"&password="+pass
Dim result As String = ""
Try

Dim request As HttpWebRequest = DirectCast ( WebRequest.Create ( auth_url ) , HttpWebRequest )
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

'Send Message Api

Public Function SendMessage ( ByVal api_token As String, ByVal mobile As String , ByVal message As String , ByVal sendername As String ) As String

Dim postData As String = ""
postData=username="+api_token+"&mobile="+mobile+"&message="+message+"&sender="+sendername
Dim send_url As String = "https://www.marsooly.com/api/SendMessage.aspx
Dim result As String = ""
Try

Dim encoding As UTF8Encoding
Dim byteData As Byte() = encoding.GetBytes(postData)
Dim request As HttpWebRequest = DirectCast(WebRequest.Create(send_url), HttpWebRequest )
request.Method = "POST"
request.KeepAlive = True
request.ContentLength = byteData.Length
request.ContentType = "application/x-www-form-urlencoded"
Dim postreqstream As Stream = request.GetRequestStream ()
postreqstream.Write(byteData , 0 , byteData.Length )
postreqstream.Close ()
Dim httpwr As HttpWebResponse = DirectCast ( request.GetResponse () , HttpWebResponse )
Dim streamReader As New StreamReader ( httpwr.GetResponseStream () )
result = streamReader.ReadToEnd ()
streamReader.Close ()
Return result

Catch ex As Exception
Return ex.Message
End Try

End Function

Public Sub Authentication()
	Dim api_token As String
	Dim result As String
	Dim myURL As String
	Dim code As String =1
	Dim postData As String
	Dim winHttpReq As Object
	username = "your username"
	password = "your password"

 
	Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
 
	myURL = "https://www.marsooly.com/api/users.aspx?"
	postData = "username=" + username + "&password=" + password + "&code=" + code 
 
	winHttpReq.Open "POST", myURL, False
	winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
	winHttpReq.Send (postData)
 
	Authentication = winHttpReq.responseText
End Sub
Public Sub GetSenderNames()
	Dim username As String
	Dim password As String
	Dim result As String
	Dim myURL As String
	Dim code As String =8
	Dim postData As String
	Dim winHttpReq As Object
	username = "your username"
	password = "your password"

 
	Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
 
	myURL = "https://www.marsooly.com/api/users.aspx?"
	postData = "username=" + username + "&password=" + password + "&code=" + code 
 
	winHttpReq.Open "POST", myURL, False
	winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
	winHttpReq.Send (postData)
 
	GetSenderNames = winHttpReq.responseText
End Sub
Public Sub GetBalance()
	Dim username As String
	Dim password As String
	Dim result As String
	Dim myURL As String
	Dim code As String =7
	Dim postData As String
	Dim winHttpReq As Object
	username = "your username"
	password = "your password"

 
	Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
 
	myURL = "https://www.marsooly.com/api/users.aspx?"
	postData = "username=" + username + "&password=" + password + "&code=" + code 
 
	winHttpReq.Open "POST", myURL, False
	winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
	winHttpReq.Send (postData)
 
	GetBalance = winHttpReq.responseText
End Sub
Public Sub SendMessage()
	Dim api_token As String
	Dim mobile As String
	Dim message As String
	Dim sender As String
	Dim result As String
	Dim myURL As String
	Dim postData As String
	Dim winHttpReq As Object
	api_token = "your api_token"
	mobile = "9665xxxxxxxx1,9665xxxxxxxx2"
    message = "your message"
    sender = "your sender name"

 
	Set winHttpReq = CreateObject("WinHttp.WinHttpRequest.5.1")
 
	myURL = "https://www.marsooly.com/api/SendMessage.aspx?"
	postData = "api_token=" + api_token + "&mobile=" + mobile"&message=" + message"&sender=" + sender
 
	winHttpReq.Open "POST", myURL, False
	winHttpReq.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
	winHttpReq.Send (postData)
 
	result = winHttpReq.responseText
End Sub
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

public class Api {
	public String Authentication() {
		try {
			
            // Construct data
			String username = "username=" + "your username";
            String password = "&password=" + "your password";
			String code = "&code=1";
			

			// Authentication data
			HttpURLConnection conn =(HttpURLConnection)new URL("https://www.marsooly.com/api/users.aspx?").openConnection();
			String data = username + password + code ;
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			conn.setRequestProperty("Content-Length", Integer.toString(data.length()));
			conn.getOutputStream().write(data.getBytes("UTF-8"));
			final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			final StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = rd.readLine()) != null) {
				stringBuffer.append(line);
			}
			rd.close();

			return stringBuffer.toString();
		} catch (Exception e) {
			System.out.println("Error SMS "+e);
			return "Error "+e;
		}
	}
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

public class Api {
	public String GetSenderNames() {
		try {
			
            // Construct data
			String username = "username=" + "your username";
            String password = "&password=" + "your password";
			String code = "&code=8";
			

			// get senders names data
			HttpURLConnection conn = (HttpURLConnection) new URL("https://www.marsooly.com/api/users.aspx?").openConnection();
			String data = username + password + code ;
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			conn.setRequestProperty("Content-Length", Integer.toString(data.length()));
			conn.getOutputStream().write(data.getBytes("UTF-8"));
			final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			final StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = rd.readLine()) != null) {
				stringBuffer.append(line);
			}
			rd.close();

			return stringBuffer.toString();
		} catch (Exception e) {
			System.out.println("Error SMS "+e);
			return "Error "+e;
		}
	}
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

public class Api {
	public String GetBalance() {
		try {
			
            // Construct data
			String username = "username=" + "your username";
            String password = "&password=" + "your password";
			String code = "&code=7";
			

			// get sms credit data
			HttpURLConnection conn = (HttpURLConnection) new URL("https://www.marsooly.com/api/users.aspx?").openConnection();
			String data = username + password + code ;
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			conn.setRequestProperty("Content-Length", Integer.toString(data.length()));
			conn.getOutputStream().write(data.getBytes("UTF-8"));
			final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			final StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = rd.readLine()) != null) {
				stringBuffer.append(line);
			}
			rd.close();

			return stringBuffer.toString();
		} catch (Exception e) {
			System.out.println("Error SMS "+e);
			return "Error "+e;
		}
	}
}
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;

public class Api {
	public String SendMessage() {
		try {
			
            // Construct data
			String api_token = "api_token=" + "your username";
            String message = "&message=" + "here is your message";
			String sender = "&sender=" + "sender name here";
			String mobile = "&mobile=" + "9665xxxxxxxx1,9665xxxxxxxx2";


			// Send data
			HttpURLConnection conn = (HttpURLConnection) new URL("https://www.marsooly.com/api/SendMessage.aspx?").openConnection();
			String data = api_token + mobile + message + sender;
			conn.setDoOutput(true);
			conn.setRequestMethod("POST");
			conn.setRequestProperty("Content-Length", Integer.toString(data.length()));
			conn.getOutputStream().write(data.getBytes("UTF-8"));
			final BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));
			final StringBuffer stringBuffer = new StringBuffer();
			String line;
			while ((line = rd.readLine()) != null) {
				stringBuffer.append(line);
			}
			rd.close();

			return stringBuffer.toString();
		} catch (Exception e) {
			System.out.println("Error SMS "+e);
			return "Error "+e;
		}
	}
}

    
	Dim  username  As String = "your username"
    Dim  password  As String = "your password"
	Dim  code  As String = "1"
	Dim  link  As String = "http://www.marsooly.com/api/users.aspx?"
	Dim  url  As String =  link & "username=" & username & "&password=" & password & "&code=" & code 
    
    Dim  result  As String = Inet1.OpenURL(url ,  icString) 

    

    
	Dim  username  As String = "your username"
    Dim  password  As String = "your password"
	Dim  code  As String = "8"
	Dim  link  As String = "http://www.marsooly.com/api/users.aspx?"
	Dim  url  As String =  link & "username=" & username & "&password=" & password & "&code=" & code 
    
    Dim  result  As String = Inet1.OpenURL(url ,  icString) 

    

    
	Dim  username  As String = "your username"
    Dim  password  As String = "your password"
	Dim  code  As String = "7"
	Dim  link  As String = "http://www.marsooly.com/api/users.aspx?"
	Dim  url  As String =  link & "username=" & username & "&password=" & password & "&code=" & code 
    
    Dim  result  As String = Inet1.OpenURL(url ,  icString) 

    

    
	Dim  api_token  As String = "your api_token"
	Dim  message  As String = "your message here"
	Dim  mobile  As String = "9665xxxxxxxx1,9665xxxxxxxx2"
	Dim  sender  As String = "your sender name here"
	Dim  link  As String = "https://www.marsooly.com/api/SendMessage.aspx?"
	Dim  url  As String =  link & "api_token=" & api_token & "&message=" & message "&mobile=" & mobile "&sender=" & sender 
    
    Dim  result  As String = Inet1.OpenURL(url ,  icString) 

    
#!/usr/bin/env python

import urllib.request
import urllib.parse

def Authentication(username, password, code):
    data =  urllib.parse.urlencode({'username': username, 'password': password,'code' : code})
    data = data.encode('utf-8')
    request = urllib.request.Request("https://www.marsooly.com/api.users.aspx?")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)

resp =  Authentication('username', '***********','1')
print (resp)
#!/usr/bin/env python

import urllib.request
import urllib.parse

def GetSenderNames(username, password, code):
    data =  urllib.parse.urlencode({'username': username, 'password': password,'code' : code})
    data = data.encode('utf-8')
    request = urllib.request.Request("https://www.marsooly.com/api.users.aspx?")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)

resp =  GetSenderNames('username', '**********','8')
print (resp)
#!/usr/bin/env python

import urllib.request
import urllib.parse

def GetBalance(username, password, code):
    data =  urllib.parse.urlencode({'username': username, 'password': password,'code' : code})
    data = data.encode('utf-8')
    request = urllib.request.Request("https://www.marsooly.com/api.users.aspx?")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)

resp =  GetBalance('username', '**********','7')
print (resp)
#!/usr/bin/env python

import urllib.request
import urllib.parse

def SendMessage(api_token, message, mobile, sender):
    data =  urllib.parse.urlencode({'api_token': api_token,'message' : message, 'mobile': mobile, 'sender': sender})
    data = data.encode('utf-8')
    request = urllib.request.Request("https://www.marsooly.com/api/SendMessage.aspx?")
    f = urllib.request.urlopen(request, data)
    fr = f.read()
    return(fr)

resp =  SendMessage('api_token','your message here', '9665xxxxxxx1,9665xxxxxxx2', 'yuor sender name here')
print (resp)
function Authentication(username, password, Sender, mobile,Message: String):string;
    const URL = 'https://www.marsooly.com/api/users.aspx?code=1&username=%s&password=%s';
      ResponseSize = 1024;
    var
      hSession, hURL: HInternet;
      Request: String;

      ResponseLength: Cardinal;
    begin
      hSession := InternetOpen('DrBob42', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        Request := Format(URL,[username,password]); 
        hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
        try
          SetLength(Result, ResponseSize);
          InternetReadFile(hURL, PChar(Result), ResponseSize,
            ResponseLength);
          SetLength(Result, ResponseLength)
        finally
          InternetCloseHandle(hURL)
        end
      finally
        InternetCloseHandle(hSession)
      end
    end;
function GetSenderNames(username, password, Sender, mobile,Message: String):string;
    const URL = 'https://www.marsooly.com/api/users.aspx?code=8&username=%s&password=%s';
      ResponseSize = 1024;
    var
      hSession, hURL: HInternet;
      Request: String;

      ResponseLength: Cardinal;
    begin
      hSession := InternetOpen('DrBob42', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        Request := Format(URL,[username,password]); 
        hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
        try
          SetLength(Result, ResponseSize);
          InternetReadFile(hURL, PChar(Result), ResponseSize,
            ResponseLength);
          SetLength(Result, ResponseLength)
        finally
          InternetCloseHandle(hURL)
        end
      finally
        InternetCloseHandle(hSession)
      end
    end;
function GetBalance(username, password, Sender, mobile,Message: String):string;
    const URL = 'https://www.marsooly.com/api/users.aspx?code=7&username=%s&password=%s';
      ResponseSize = 1024;
    var
      hSession, hURL: HInternet;
      Request: String;

      ResponseLength: Cardinal;
    begin
      hSession := InternetOpen('DrBob42', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        Request := Format(URL,[username,password]); 
        hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
        try
          SetLength(Result, ResponseSize);
          InternetReadFile(hURL, PChar(Result), ResponseSize,
            ResponseLength);
          SetLength(Result, ResponseLength)
        finally
          InternetCloseHandle(hURL)
        end
      finally
        InternetCloseHandle(hSession)
      end
    end;
function SendSMS(api_token, Sender, mobile,Message: String):string;
    const URL = 'https://www.marsooly.com/api/SendMessage.aspx?api_token=%s&sender=%s&mobile=%s&message=%s';
      ResponseSize = 1024;
    var
      hSession, hURL: HInternet;
      Request: String;

      ResponseLength: Cardinal;
    begin
      hSession := InternetOpen('DrBob42', INTERNET_OPEN_TYPE_PRECONFIG, nil, nil, 0);
      try
        Request := Format(URL,[api_token,Sender,mobile,HttpEncode(Message)]);
        hURL := InternetOpenURL(hSession, PChar(Request), nil, 0,0,0);
        try
          SetLength(Result, ResponseSize);
          InternetReadFile(hURL, PChar(Result), ResponseSize,
            ResponseLength);
          SetLength(Result, ResponseLength)
        finally
          InternetCloseHandle(hURL)
        end
      finally
        InternetCloseHandle(hSession)
      end
    end;
#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $username = 'your username'; 
my $password = 'your password'; 
my $code = "1";
my $ua = LWP::UserAgent->new();

my $res = $ua->request
(
 POST 'https://www.marsooly.com/api/users.aspx?',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [
		'username'	=> $username,
		'password'	=> $password,
		'code'	=> $code
		]
);

if ($res->is_error) { die "HTTP Errorn"; }
print "Response:nn" . $res->content . "nn";
#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $username = 'your username'; 
my $password = 'your password'; 
my $code = "8";
my $ua = LWP::UserAgent->new();

my $res = $ua->request
(
 POST 'https://www.marsooly.com/api/users.aspx?',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [
		'username'	=> $username,
		'password'	=> $password,
		'code'	=> $code
		]
);

if ($res->is_error) { die "HTTP Errorn"; }
print "Response:nn" . $res->content . "nn";
#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $username = 'your username'; 
my $password = 'your password'; 
my $code = "7";
my $ua = LWP::UserAgent->new();

my $res = $ua->request
(
 POST 'https://www.marsooly.com/api/users.aspx?',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [
		'username'	=> $username,
		'password'	=> $password,
		'code'	=> $code
		]
);

if ($res->is_error) { die "HTTP Errorn"; }
print "Response:nn" . $res->content . "nn";
#!/usr/bin/perl

use strict;
use LWP::UserAgent;
use HTTP::Request::Common;

my $api_token = 'your api_token'; 
my $sender = "your sender name";
my $mobile = "9665xxxxxxxx,9665xxxxxxxx";
my $message = "here is your message";
my $ua = LWP::UserAgent->new();

my $res = $ua->request
(
 POST 'https://www.marsooly.com/api/SendMessage.aspx?',
 Content_Type  => 'application/x-www-form-urlencoded',
 Content       => [
		'api_token'	=> $api_token,
		'mobile'	=> $mobile,
		'message'	=> $message,
		'sender'	=> $sender
		]
);

if ($res->is_error) { die "HTTP Errorn"; }
print "Response:nn" . $res->content . "nn";
require "rubygems"
require "net/https"
require "uri"
require "json"

requested_url = 'https://www.marsooly.com/api/users.aspx?'

uri = URI.parse(requested_url)
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

res = Net::HTTP.post_form(uri, 'username' => 'your username', 'password' => 'your password', 'code' => '1')
response = JSON.parse(res.body)
puts (response)
require "rubygems"
require "net/https"
require "uri"
require "json"

requested_url = 'https://www.marsooly.com/api/users.aspx?'

uri = URI.parse(requested_url)
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

res = Net::HTTP.post_form(uri, 'username' => 'your username', 'password' => 'your password', 'code' => '8')
response = JSON.parse(res.body)
puts (response)
require "rubygems"
require "net/https"
require "uri"
require "json"

requested_url = 'https://www.marsooly.com/api/users.aspx?'

uri = URI.parse(requested_url)
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

res = Net::HTTP.post_form(uri, 'username' => 'your username', 'password' => 'your password', 'code' => '7')
response = JSON.parse(res.body)
puts (response)
require "rubygems"
require "net/https"
require "uri"
require "json"

requested_url = 'https://www.marsooly.com/api/SendMessage.aspx?'

uri = URI.parse(requested_url)
http = Net::HTTP.start(uri.host, uri.port)
request = Net::HTTP::Get.new(uri.request_uri)

res = Net::HTTP.post_form(uri, 'api_token' => 'your api_token' => 'message' => 'here is your message', 'sender' => 'your sender name', 'mobile' => '9665xxxxxxxx,9665xxxxxxxx')
response = JSON.parse(res.body)
puts (response)