ملی پیامک

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

ملی پیامک

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

ملی پیامک

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

پیامکهای دریافتی کاربران (محدوده زمانی)

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

آدرس وب سرویس

متد GetUsersMessagesByDate

از این متد جهت بررسی پیامکهای دریافتی کاربران براساس تاریخ استفاده می‌شود

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

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

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

نام پارامترنوع پارامترتوضیحات
ReturnValue List of Class MessagesBL[]
GetUsersMessagesByDate
//GitHub نمونه کدهای
$username = 'username';
$password = 'password';
$api = new MelipayamakApi($username,$password);
$sms = $api->sms('soap');
$sms->getUsersMessagesByDate($location,$index,$count,$from,$dateFrom,$dateTo);

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
ini_set("soap.wsdl_cache_enabled","0");
$sms =new SoapClient("http://api.payamak-panel.com/post/Receive.asmx?wsdl",array("encoding"=>"UTF-8"));
$dateFrom =date("2018-12-06");
$dateTo =date("2020-12-06");
$data = array(
    "username" =>'username',
    "password" =>'password',
    "location" => 1,
    "from" => "",
    "index" => 0,
    "count" => 100,
    "dateFrom" => $dateFrom,
    "dateTo" => $dateTo
);
$result = $client->GetUsersMessagesByDate($data)->GetUsersMessagesByDateResult;
//var_dump($result);
foreach ($result as $res){
    foreach ($res as $value){
        echo "Message ID : ".$value->MsgID."\n";
        echo "Message Body : ".$value->Body."\n";
        echo "Send Date : ".$value->SendDate."\n";
        echo "Receiver : ".$value->Receiver;
    }
}
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms('soap');
sms.getUsersMessagesByDate(location,index,count,from,dateFrom,dateTo);
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetUsersMessagesByDate(location, from, index, count, dateFrom, dateTo);
const string username = "username";
const string password = "password";
ReceiveSoapClient soapClient = new ReceiveSoapClient();
soapClient.GetUsersMessagesByDate(username, password, location, from, index, count, dateFrom, dateTo);
Const  username As String = "username"
Const  password As String = "password"
Dim soapClient As New ReceiveSoapClient()
soapClient.GetUsersMessagesByDate(username, password, location, from, index, count, dateFrom, dateTo)
let username: String = "username"
let password: String = "password"
var soapClient = SoapClient(user: username, pass: password)
soapClient.GetUsersMessagesByDate(loc: location, from: from, indx: index, cnt: count, dfrom: dateFrom, dto: dateTo)
NSString *username = @"username";
NSString *password = @"password";
SoapClient *soapClient = [[SoapClient alloc] initCred:username password:password];
[soapClient GetUsersMessagesByDate:location from:from index:index count:count dateFrom:dFrom dateTo:dTo];
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms('soap')
sms.get_users_messages_by_date(location,index,count,from,date_from,date_to)
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetUsersMessagesByDate(location, from, index, count, dateFrom, dateTo);
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms('soap')
sms.get_users_messages_by_date(location,index,count,from,date_from,date_to)
my $username = "username";
my $password = "password";
my $soapClient = new SoapClient($username, $password);
$soapClient->GetUsersMessagesByDate($location, $from, $index, $count, $dateFrom, $dateTo);
local username = "username";
local password = "password";
GetUsersMessagesByDate(username, password, location, from, index, count, dateFrom, dateTo);
username := "username";
password := "password";
GetUsersMessagesByDate(username, password, location, from, index, count, dateFrom, dateTo);
val username = "username"
val password = "password"
val soapClient = SoapClient(username, password)
soapClient.GetUsersMessagesByDate(location, from, index, count, dateFrom, dateTo)
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>
    <GetUsersMessagesByDateResponse xmlns="http://tempuri.org/">
      <GetUsersMessagesByDateResult>
        <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>
      </GetUsersMessagesByDateResult>
    </GetUsersMessagesByDateResponse>
  </soap:Body>
</soap:Envelope>