app

ميزات بوابة مرسولي SMS API

تعاون متعمق مع مئات المشغلين في الخارج ، وإرساء متعدد البروتوكولات لضمان تلبية الاحتياجات ، وطرق نقل متعددة للوصول بسهولة إلى العالم

  • منصة مستقرة وموثوقة

    منصة مرسول تعمل على سيرفرات ذو سعة كبيرة وتزامن وموزع عالي وكذالك التوافر وبنية شبكة مرنة للغاية وقابلة للتطوير

  • فوترة اسعار منخفضة ومعقولة

    نتميز بالاسعار ذات التكلفة المنخفضة والمعقولة

  • خدمة عالية الجودة ومعالجة سريعة

    خدمة عبر الإنترنت 7 × 24 ، استجابة سريعة في الوقت المناسب ، تساعد الرفاق على تحقيق المزيد.

app

ما الذي يمكنك فعله باستخدام واجهة برمجة تطبيقات بوابة مرسولي

  • رسائل الاخطارات والتنبيهات

    أرسل إشعارات إلى عملائك مثل المدفوعات عبر الإنترنت وتتبع الطلبات وتذكيرات المواعيد وتأكيدات الحجز والمزيد.

  • رسائل المصادقة الثنائية (2FA) وكود التفعيل

    استخدم منصة مرسولي للتحقق من المستخدمين والمصادقة على حساباتهم أثناء تسجيل الدخول والتحقق من أرقام الهواتف المحمولة عن طريق إرسال رمز التفعيل.

  • تتبع حالة التسليم للرسائل المرسلة

    يمكنك الحصول على تقارير حالة التسليم في الوقت الحقيقي من خلال واجهة بوابة الرسائل القصيرة الخاصة بنا.

app

أهم مميزات بوابة مرسولي للرسائل

اجعل الحياة سهلة لعملائك. قم بدمج بوابة الرسائل النصية الخاصة بنا في تطبيقك للرسائل الفورية بتكاليف منخفضة.

  • دعم قنوات متعددة من خلال نظام أساسي واحد

  • إعداد سريع للحساب وتفعيل عنوان المرسل

  • تحكم كامل في عمليات الإرسال

  • دعم متعدد اللغات

  • تغطية عالمية - الوصول إلى أكثر من 95٪ من دول العالم

  • آمان وموثوقية

gfx

بوابة آمنة وسريعة

بوابة مرسولي sms api تتميز بالسرعة والأمان عند إرسال الرسائل. تتميز بسرعة إيصال الرسائل إلى المشغلين في ثوانٍ معدودة ، فضلاً عن تشفير كافة البيانات المستخدمة أثناء عملية الإرسال.

4 خطوات سريعة للبدء

في عالم أصبحت فيه الرسائل القصيرة امتدادًا لحلول مزودي البرمجيات وتطبيقات الهاتف المحمول ، أصبح اختيار مزود رسائل نصية قوي يتمتع بقدرات عالية للارتباط ببوابة الإرسال أحد الأمور المهمة لضمان جودة الخدمة والتكامل.

الإشتراك وتسجيل الحساب

يتم إنشاء مفتاح تفويض تلقائيًا بعد التسجيل في منصة مرسولي

الإعدادات الأولية

تمكين بروتوكول SMPP ، والسماح لواجهة HTTP API لإدارة جميع ميزات sms api

إنشاء المجموعات وجهات الاتصال

انشاء المجموعات واستيراد جهات الاتصال لهذه المجموعات

تفعيل اسم المرسل وبدء الإرسال

تفعيل عنوان المرسل للرسائل وبدء الإرسال للرسائل ومتابعة حالات التسليم للرسائل المرسلة

<?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)
دعنا نريك كيف تبداء

كل يوم نساعد العلامات التجارية الرائدة في السعودية على إنشاء أكثر الأحداث إهتماماَ.