easysendsms.com

Check Balance

Balance HTTP(s) API (Get, Post Method)

This page provides a reference for all features available to you via the HTTP interface for Balance query.

The HTTP-API allows you to integrate your system (client) to EasySendSMS using the HTTP protocol to request and check your account balance. HTTPS is also supported for secure transactions using SSL encryption.

The Client issues either a GET or POST request to the EasySendSMS HTTP API supplying a list of required parameters. Our system issues back a HTTP response as text format which indicates the balance of the account.

This call will fetch the current credit in your account


API Base URL:

https://api.easysendsms.app/balance
Parameter Description Presence
Username Your EasySendSMS username Mandatory
Password Your EasySendSMS account password or your API password (if you set at your account settings) Mandatory

HTTP Response

The HTTP response from our system contains the following:

Response text Format

If the balance request pass successfully the status code will return account balance:

1000 (Balance)

If balance query incorrect it will return ERROR: {Error code}

Example:

1002

Example:

Below are example for (Get Method) request when using the HTTP interface.

Example:

Username: testuser

Password: secret

https://api.easysendsms.app/balance?username=testuser&password=secret

Output:

1000 (Balance)

API Error Codes:

Code Description
1001 Invalid username or password. This means the parameter was not provided or left blank.
1002 Authentication failed.
1007 Inactive or expired demo account.

API rate limit:

To maintain a high quality of service to all customers, EasySendSMS API applies rate limits for its HLR API.

The default request rate limit is 2 request per minute per account per IP address.

The API will reject all requests exceeding this rate limit with 429 Too Many Requests HTTP Status.

You can retry the request after 60 second.

API code examples:

Here, you'll find a variety of sample code snippets that demonstrate how to use our API. Whether you're a seasoned developer or just starting out, these examples can help you get started quickly and easily. Each code example is designed to showcase a specific feature or use case of our API, making it easy to find the information you need. You can copy and paste the code into your own project, or use it as a starting point to build your own custom solution.



var options = new RestClientOptions("")
{
MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("https://api.easysendsms.app/balance", Method.Post);
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
request.AddHeader("Cookie", "ASPSESSIONIDASCQBARR=NKOHDCHDOFEOOALJIGDGGPAM; ASPSESSIONIDQSSDABDR=GBMPKKKDOBIPGBAMEHKNDAIE");
request.AddParameter("username", "username");
request.AddParameter("password", "password");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
                                            

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.easysendsms.app/balance',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => 'username=username&password=password',
CURLOPT_HTTPHEADER => array(
    'Content-Type: application/x-www-form-urlencoded',
    'Cookie: ASPSESSIONIDASCQBARR=NKOHDCHDOFEOOALJIGDGGPAM; ASPSESSIONIDQSSDABDR=GBMPKKKDOBIPGBAMEHKNDAIE'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
                                            

Unirest.setTimeouts(0, 0);
HttpResponse response = Unirest.post("https://api.easysendsms.app/balance")
.header("Content-Type", "application/x-www-form-urlencoded")
.header("Cookie", "ASPSESSIONIDASCQBARR=NKOHDCHDOFEOOALJIGDGGPAM; ASPSESSIONIDQSSDABDR=GBMPKKKDOBIPGBAMEHKNDAIE")
.field("username", "username")
.field("password", "password")
.asString();
                                            

Integrate with an SMS API today.

Get Free 15 SMS Now....