Retrieves your balance
ENDPOINTS
- GET /balance
- OR POST /balance
Request object
username (required) string
password (required) string
{
"auth": {
"username": "demo",
"password": "demo"
}
}
Code example
$data = array(
"auth" => array(
"username" => "demo",
"password" => "demo"
)
);
$payload = json_encode($data);
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://smsverification.xyz/api/v2/balance',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_POSTFIELDS => $payload,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Content-Length: ' . strlen($payload)
)
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response; // json
Success Response
balance => float
{
"status": "success",
"data": {
"balance": 2.5
}
}