用户
获取余额
GET
/balance
返回用户的余额。
响应案例:
curl -X GET "https://apid.iproyal.com/v1/reseller/balance" \
-H "X-Access-Token: <your_access_token>" \
-H "Content-Type: application/json"
<?php
$api_token = '<your_access_token>';
$url = "https://apid.iproyal.com/v1/reseller/balance";
$options = [
CURLOPT_URL => $url,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-Access-Token: $api_token",
'Content-Type: application/json'
]
];
$ch = curl_init();
curl_setopt_array($ch, $options);
$response = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
} else {
echo $response;
}
curl_close($ch);
?>
import requests
api_token = '<your_access_token>'
url = 'https://apid.iproyal.com/v1/reseller/balance'
headers = {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
const https = require('https');
const api_token = '<your_access_token>';
const options = {
hostname: 'apid.iproyal.com',
path: '/v1/reseller/balance',
method: 'GET',
headers: {
'X-Access-Token': api_token,
'Content-Type': 'application/json'
}
};
const req = https.request(options, (res) => {
let responseData = '';
res.on('data', (chunk) => {
responseData += chunk;
});
res.on('end', () => {
console.log(responseData);
});
});
req.on('error', (error) => {
console.error('Error:', error.message);
});
req.end();
响应示例:
884.05
Last updated