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

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

آدرس فراخوانی :

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

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

پاسخ:

json :
{
    "success": true,
    "data": {
        "credit": "999.99"
    }
}

success

در صورتی که مقدار آن true باشد پاسخ درخواست شما موفقیت آمیز بوده است.

data

حاوی اطلاعات اعتبار پیامکی کاربر است

#فیلدنام
1creditمقدار اعتبار پیامکی
نمونه کد
    

curl –location ‘http://panel.signalads.com/core/rest/api/v1/user/credit.json’ \
–header ‘Accept: application/json’ \
–header ‘Content-Type: application/json’ \
–header ‘Authorization: Bearer TOKEN’

    

$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => ‘http://panel.signalads.com/core/rest/api/v1/user/credit.json’,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => ”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => ‘GET’,
CURLOPT_HTTPHEADER => array(
‘Accept: application/json’,
‘Content-Type: application/json’,
‘Authorization: Bearer TOKEN’
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;

    

import http.client
import json

conn = http.client.HTTPSConnection(“panel.signalads.com”)
payload = ”
headers = {
‘Accept’: ‘application/json’,
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘Bearer TOKEN’
}
conn.request(“GET”, “/core/rest/api/v1/user/credit.json”, payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode(“utf-8”))

    

var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Get, “http://panel.signalads.com/core/rest/api/v1/user/credit.json”);
request.Headers.Add(“Accept”, “application/json”);
request.Headers.Add(“Authorization”, “Bearer TOKEN”);
var content = new StringContent(string.Empty);
content.Headers.ContentType = new MediaTypeHeaderValue(“application/json”);
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());

    

var request = require(‘request’);
var options = {
‘method’: ‘GET’,
‘url’: ‘http://panel.signalads.com/core/rest/api/v1/user/credit.json’,
‘headers’: {
‘Accept’: ‘application/json’,
‘Content-Type’: ‘application/json’,
‘Authorization’: ‘Bearer TOKEN’
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});

    

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse(“application/json”);
RequestBody body = RequestBody.create(mediaType, “”);
Request request = new Request.Builder()
.url(“https://panel.signalads.com/core/rest/api/v1/user/credit.json”)
.method(“GET”, body)
.addHeader(“Accept”, “application/json”)
.addHeader(“Content-Type”, “application/json”)
.addHeader(“Authorization”, “Bearer TOKEN”)
.build();
Response response = client.newCall(request).execute();

دریافت مشاوره