ملی پیامک

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

ملی پیامک

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

ملی پیامک

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

دریافت میزان اعتبار پیامکی

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

آدرس وب سرویس

متد GetCredit

از این متد برای دریافت میزان موجودی پنل اس ام اس، بر حسب تعداد پیامک استفاده می‌شود.

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

نام پارامترنوع پارامترتوضیحات
username String اجباری نام کاربری مربوط به حساب شما در سامانه
password String اجباری کلمه عبور مربوط به حساب شما در سامانه

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

نام پارامترنوع پارامترتوضیحات
Value String اگر اطلاعات صحیح باشد، مقدار موجودی پنل اس ام اس، بر حسب تعداد پیامک را دریافت خواهید کرد. در غیر این صورت مقدار Null دریافت می‌کنید
RetStatus Int اگر درخواست موفق باشید مقدار ۱ دریافت می‌کنید
StrRetStatus String اگر درخواست موفق باشید مقدار ok دریافت می‌کنید

URL دریافت میزان اعتبار:

api.payamak-panel.com/post/Send.asmx/GetCredit?username=&password=

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

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
$data = array('username' => "", 'password' => "" );
$post_data = http_build_query($data);
$handle = curl_init('https://rest.payamak-panel.com/api/SendSMS/GetCredit');
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->getCredit();

//بدون نیاز به پکیج گیت هاب Procedural PHP نمونه کدهای 
ini_set("soap.wsdl_cache_enabled",0);
$sms = new SoapClient("http://api.payamak-panel.com/post/Send.asmx?wsdl",array("encoding"=>"UTF-8"));
$data = array("username"=>"","password"=>"");
echo $sms->GetCredit($data)->GetCreditResult;
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms();
sms.getCredit();
const username = 'username';
const password = 'password';
const api = new MelipayamakApi(username,password);
const sms = api.sms('soap');
sms.getCredit();
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetCredit();
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetCredit();
const string username = "username";
const string password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetCredit();
const string username = "username";
const string password = "password";
SendSoapClient soapClient = new SendSoapClient();
soapClient.GetCredit(username, password);
Const  username As String = "username"
Const  password As String = "password"
Dim restClient As New RestClient(username, password)
restClient.GetCredit()
Const  username As String = "username"
Const  password As String = "password"
Dim soapClient As New SendSoapClient()
soapClient.GetCredit(username, password)
let username: String = "username"
let password: String = "password"
var restClient = RestClient(user: username, pass: password)
restClient.GetCredit()
let username: String = "username"
let password: String = "password"
var soapClient = SoapClient(user: username, pass: password)
soapClient.GetCredit()
NSString *username = @"username";
NSString *password = @"password";
RestClient *restClient = [[RestClient alloc] initCred:username password:password];
[restClient GetCredit];
NSString *username = @"username";
NSString *password = @"password";
SoapClient *soapClient = [[SoapClient alloc] initCred:username password:password];
[soapClient GetCredit];
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms()
sms.get_credit()
username = 'username'
password = 'password'
api = Api(username,password)
sms = api.sms('soap')
sms.get_credit()
final String username = "username";
final String password = "password";
RestClient restClient = new RestClient(username, password);
restClient.GetCredit();
final String username = "username";
final String password = "password";
SoapClient soapClient = new SoapClient(username, password);
soapClient.GetCredit();
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms
sms.get_credit
username = 'username'
password = 'password'
api = Melipayamakapi.new(username,password)
sms = api.sms('soap')
sms.get_credit
my $username = "username";
my $password = "password";
my $restClient = new RestClient($username, $password);
$restClient->GetCredit();
my $username = "username";
my $password = "password";
my $soapClient = new SoapClient($username, $password);
$soapClient->GetCredit();
local username = "username";
local password = "password";
GetCredit(username, password);
local username = "username";
local password = "password";
GetCredit(username, password);
username := "username";
password := "password";
GetCredit(username, password);
username := "username";
password := "password";
GetCredit(username, password);
val username = "username"
val password = "password"
val restClient = new RestClient(username, password)
restClient.GetCredit()
val username = "username"
val password = "password"
val soapClient = SoapClient(username, password)
soapClient.GetCredit()
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>
    <GetCreditResponse xmlns="http://tempuri.org/">
      <GetCreditResult>double</GetCreditResult>
    </GetCreditResponse>
  </soap:Body>
</soap:Envelope>


{   "Value": "Status",   "RetStatus": 1,   "StrRetStatus": "Ok" }