ملی پیامک

مستندات وب‌سرویس پیامک

ملی پیامک

مستندات وب‌سرویس پیامک

ملی پیامک

مستندات وب‌سرویس پیامک

نمایش پیامک‌های دریافتی/ارسالی

آخرین به روز رسانی: 18 دی 1402

متد GetMessages

این متد جهت نمایش پیامک‌های دریافتی/ارسالی به کار می رود.

پارامتر های ورودی

نام پارامترنوع پارامترتوضیحات
username String اجباری نام کاربری مربوط به حساب شما در سامانه
password String اجباری کلیمه عبور مربوط به حساب شما در سامانه
location Int اجباری مشخص کننده نوع پیامک است، اگر ۱ باشد پیامکهای دریافتی، اگر ۲ باشد پیامکهای ارسالی را مشخص می کند و اگر -۱ تنظیم شود کلیه پیامکها درخواست می شوند.
from String اختیاری شماره فرستنده (مثلا ۱۰۰۱۲۳)، در صورت خالی گذاشتن این پارامتر، پیام‌های کلیه شماره‌ها دریافت می‌شود
index Int اجباری اندیس مربوط به ردیف پیام‌های دریافتی - پیشنهاد می‌گردد این مقدار را ۰ در نظر بگیرید
count Int اجباری تعداد رکورد درخواستی

مقدار بازگشتی

نام پارامترنوع پارامترتوضیحات
ReturnValue List of Class MessagesBL []

URL دریافت پیامک‌های دریافتی/ارسالی:

api.payamak-panel.com/post/Send.asmx/getMessages?username=&password=&location=&from=&index=&count=

//GitHub نمونه کدهای
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username, $password);
$sms = $api->sms();
$sms->getMessages($location,$index,$count,$from);

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
$data = array('username' => "", 'password' => "",'location' => ,'from'=>"",'index'=> , 'count'=> );
$post_data = http_build_query($data);
$handle = curl_init('https://rest.payamak-panel.com/api/SendSMS/GetMessages');
curl_setopt($handle, CURLOPT_HTTPHEADER, array(
    'content-type' => 'application/x-www-form-urlencoded'
));
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($handle, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($handle, CURLOPT_POST, true);
curl_setopt($handle, CURLOPT_POSTFIELDS, $post_data);
$response = curl_exec($handle);
print_r($response);
//GitHub نمونه کدهای
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$sms = $api->sms('soap');
$sms->getMessages($location,$index,$count,$from);

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
ini_set("soap.wsdl_cache_enabled",0);
$sms = new SoapClient("http://api.melipayamak.ir/post/Send.asmx?wsdl",array("encoding"=>"UTF-8"));
$data=array("username"=>"","password"=>"","location"=>,"from"=>"","index"=>,"count"=>);
$messages = $sms->getMessages($data)->getMessagesResult->MessagesBL;
foreach ($messages as $value){
    print_r($value);
}
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms();
sms.getMessages(location,index,count,from);
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms('soap');
sms.getMessages(location,index,count,from);
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetMessages(location, index, count, from);
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.getMessages(location, index, count, from);
const string username = "username";
const string password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetMessages(location, index, count, from);
const string username = "username";
const string password = "password";
SendSoapClient soapClient = new SendSoapClient();
soapClient.getMessages(username, password, location, from, index, count);
Const  username As String = "username"
Const  password As String = "password"
Dim restClient As New RestClient(username, password)
restClient.GetMessages(location, index, count, from)
Const  username As String = "username"
Const  password As String = "password"
Dim soapClient As New SendSoapClient()
soapClient.getMessages(username, password, location, from, index, count)
let username: String = "username"
let password: String = "password"
var restClient = RestClient(user: username, pass: password)
restClient.GetMessages(loc: location, indx: index, cnt: count, from: from)
let username: String = "username"
let password: String = "password"
var soapClient = SoapClient(user: username, pass: password)
soapClient.getMessages(loc: location, from: from, indx: index, cnt: count)
NSString *username = @"username";
NSString *password = @"password";
RestClient *restClient = [[RestClient alloc] initCred:username password:password];
[restClient GetMessages:location from:from index:index count:count];
NSString *username = @"username";
NSString *password = @"password";
SoapClient *soapClient = [[SoapClient alloc] initCred:username password:password];
[soapClient getMessages:location from:from index:index count:count];
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms()
sms.get_messages(location,index,count,from)
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms('soap')
sms.get_messages(location,index,count,from)
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetMessages(location, index, count, from);
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.getMessages(location, from, index, count);
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms
sms.get_messages(location,index,count,from)
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms('soap')
sms.get_messages(location,index,count,from)
my $username = "username";
my $password = "password";
my $restClient = new RestClient($username, $password);
$restClient->GetMessages($location, $index, $count, $from);
my $username = "username";
my $password = "password";
my $soapClient = new SoapClient($username, $password);
$soapClient->getMessages($location, $from, $index, $count);
local username = "username";
local password = "password";
GetMessages(username, password, location, index, count, from);
local username = "username";
local password = "password";
getMessages(username, password, location, from, index, count);
username := "username";
password := "password";
GetMessages(username, password, location, index, count, from);
username := "username";
password := "password";
getMessages(username, password, location, from, index, count);
val username = "username"
val password = "password"
val restClient = new RestClient(username, password)
restClient.GetMessages(location, index, count, from)
val username = "username"
val password = "password"
val soapClient = SoapClient(username, password)
soapClient.getMessages(location, from, index, count)
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <getMessagesResponse xmlns="http://tempuri.org/">
      <getMessagesResult>
        <MessagesBL>
          <MsgID>long</MsgID>
          <UserID>int</UserID>
          <LinkID>int</LinkID>
          <NumberID>int</NumberID>
          <Tariff>double</Tariff>
          <MsgType>unsignedByte</MsgType>
          <Body>string</Body>
          <Udh>string</Udh>
          <SendDate>dateTime</SendDate>
          <Sender>string</Sender>
          <Receiver>string</Receiver>
          <FirstLocation>int</FirstLocation>
          <CurrentLocation>int</CurrentLocation>
          <Parts>int</Parts>
          <IsFlash>boolean</IsFlash>
          <IsRead>boolean</IsRead>
          <IsUnicode>boolean</IsUnicode>
          <Credit>double</Credit>
          <Module>int</Module>
          <RecCount>int</RecCount>
          <RecFailed>int</RecFailed>
          <RecSuccess>int</RecSuccess>
          <IsMoneyBack>boolean</IsMoneyBack>
          <UserStepedMaster>int</UserStepedMaster>
          <UserMaster>int</UserMaster>
          <MoneyBackCount>int</MoneyBackCount>
          <MoneyBackLevel>int</MoneyBackLevel>
          <AutoSpeechText>boolean</AutoSpeechText>
        </MessagesBL>
        <MessagesBL>
          <MsgID>long</MsgID>
          <UserID>int</UserID>
          <LinkID>int</LinkID>
          <NumberID>int</NumberID>
          <Tariff>double</Tariff>
          <MsgType>unsignedByte</MsgType>
          <Body>string</Body>
          <Udh>string</Udh>
          <SendDate>dateTime</SendDate>
          <Sender>string</Sender>
          <Receiver>string</Receiver>
          <FirstLocation>int</FirstLocation>
          <CurrentLocation>int</CurrentLocation>
          <Parts>int</Parts>
          <IsFlash>boolean</IsFlash>
          <IsRead>boolean</IsRead>
          <IsUnicode>boolean</IsUnicode>
          <Credit>double</Credit>
          <Module>int</Module>
          <RecCount>int</RecCount>
          <RecFailed>int</RecFailed>
          <RecSuccess>int</RecSuccess>
          <IsMoneyBack>boolean</IsMoneyBack>
          <UserStepedMaster>int</UserStepedMaster>
          <UserMaster>int</UserMaster>
          <MoneyBackCount>int</MoneyBackCount>
          <MoneyBackLevel>int</MoneyBackLevel>
          <AutoSpeechText>boolean</AutoSpeechText>
        </MessagesBL>
      </getMessagesResult>
    </getMessagesResponse>
  </soap:Body>
</soap:Envelope>