Get account balance
curl --request GET \
--url https://api.hixbe.com/sms/account/balance \
--header 'Authorization: Bearer <token>' \
--header 'Xerobi-Version: <xerobi-version>'import requests
url = "https://api.hixbe.com/sms/account/balance"
headers = {
"Xerobi-Version": "<xerobi-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Xerobi-Version': '<xerobi-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.hixbe.com/sms/account/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hixbe.com/sms/account/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/sms/account/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hixbe.com/sms/account/balance")
.header("Xerobi-Version", "<xerobi-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/sms/account/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"currency": "BDT",
"balance": 524.25,
"credit_limit": 1000,
"low_balance_threshold": 100,
"auto_recharge": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key provided. Check your API key at https://dashboard.hixbe.com/api-keys",
"request_id": "req_abc123"
}
}Get Account Balance
Retrieve current account balance and credit information.
GET
/
account
/
balance
Get account balance
curl --request GET \
--url https://api.hixbe.com/sms/account/balance \
--header 'Authorization: Bearer <token>' \
--header 'Xerobi-Version: <xerobi-version>'import requests
url = "https://api.hixbe.com/sms/account/balance"
headers = {
"Xerobi-Version": "<xerobi-version>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Xerobi-Version': '<xerobi-version>', Authorization: 'Bearer <token>'}
};
fetch('https://api.hixbe.com/sms/account/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hixbe.com/sms/account/balance",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Xerobi-Version: <xerobi-version>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.hixbe.com/sms/account/balance"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Xerobi-Version", "<xerobi-version>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.hixbe.com/sms/account/balance")
.header("Xerobi-Version", "<xerobi-version>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hixbe.com/sms/account/balance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Xerobi-Version"] = '<xerobi-version>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"currency": "BDT",
"balance": 524.25,
"credit_limit": 1000,
"low_balance_threshold": 100,
"auto_recharge": true
}{
"error": {
"type": "authentication_error",
"code": "invalid_api_key",
"message": "Invalid API key provided. Check your API key at https://dashboard.hixbe.com/api-keys",
"request_id": "req_abc123"
}
}Authorizations
Use your API key as a Bearer token. Format: Authorization: Bearer sk_live_xxxxx
Headers
API version in YYYY-MM-DD format. Using the latest version ensures access to newest features.
Pattern:
^\d{4}-\d{2}-\d{2}$Response
Account balance information
Account balance information
Currency code (ISO 4217)
Example:
"BDT"
Current account balance
Required range:
x >= 0Example:
524.25
Available credit limit (if applicable)
Example:
1000
Balance threshold for low balance alerts
Example:
100
Whether auto-recharge is enabled
Example:
true