ملی پیامک

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

ملی پیامک

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

ملی پیامک

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

دریافت پیامک‌های دریافتی

آخرین به روز رسانی: ۲۱ بهمن ۱۳۹۷

متد GetMessages

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

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

نام پارامترنوع پارامترتوضیحات
UsernameString اجبارینام کاربری مربوط به حساب شما در سامانه
PasswordString اجباریکلیمه عبور مربوط به حساب شما در سامانه
LocationInt اجباریمشخص کننده نوع پیامک است، اگر ۱ باشد پیامکهای دریافتی، اگر ۲ باشد پیامکهای ارسالی را مشخص می کند و اگر -۱ تنظیم شود کلیه پیامکها درخواست می شوند.
FromString اختیاریشماره فرستنده (مثلا ۱۰۰۱۲۳)، در صورت خالی گذاشتن این پارامتر، پیام‌های کلیه شماره‌ها دریافت می‌شود
IndexInt اجباریاندیس مربوط به ردیف پیام‌های دریافتی - پیشنهاد می‌گردد این مقدار را ۰ در نظر بگیرید
CountInt اجباریتعداد رکورد درخواستی

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

نام پارامترنوع پارامترتوضیحات
ReturnValueList of ClassMessagesBL []
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username, $password);
$sms = $api->sms();
$sms->getMessages($location,$index,$count,$from);
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$sms = $api->sms('soap');
$sms->getMessages($location,$index,$count,$from);
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>