Check Balance Validity Bulk SMS API Documentation

Check Balance Validity

Check your balance, account status and expiry date from single API. You can also use Telegram Messenger App to know your balance, Visit for more info on SMS Gateway Center Bot for Telegram Messenger App.

Application API URL:

https://www.smsgateway.center/SMSApi/rest/balanceValidityCheck

 

Key Value Description
Login Credentials (Required Parameters)
Authenticate your API request using userId-password or apiKey. You should use either one to authenticate your login.
userId Your Registered Username The registered username parameter to be passed. You can use this if apiKey is not being used.
password Your password The password needs to be urlencoded if there are any special characters used in the password field. You can use this if apiKey is not being used.
apiKey Your unique apiKey apiKey needs to be sent as HTTP header when you are not using userId and password credentials. You can avail this from your user control panel and use instead of userId and password HTTP Request parameter. Please do not disclose this to anyone.
Required Parameters
format plain|json|xml You can get the response in plain or xml format.

Save this Page on your Favorite Social Media

Sample Request Code

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/SMSApi/rest/balanceValidityCheck",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => "userId=YourUsername&password=YourPassword&format=json",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://www.smsgateway.center/SMSApi/rest/balanceValidityCheck?userId=YourUsername&password=YourPassword&format=json",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_POSTFIELDS => "",
  CURLOPT_HTTPHEADER => array(
    "cache-control: no-cache",
    "content-type: application/x-www-form-urlencoded"
  ),
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
var qs = require("querystring");
var http = require("http");

var options = {
  "method": "POST",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/SMSApi/rest/balanceValidityCheck",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({ userId: 'YourUsername',
  password: 'YourPassword',
  format: 'json' }));
req.end();
var qs = require("querystring");
var http = require("http");

var options = {
  "method": "GET",
  "hostname": "www.smsgateway.center",
  "port": null,
  "path": "/SMSApi/rest/balanceValidityCheck?userId=YourUsername&password=YourPassword&format=json",
  "headers": {
    "content-type": "application/x-www-form-urlencoded",
    "cache-control": "no-cache"
  }
};

var req = http.request(options, function (res) {
  var chunks = [];

  res.on("data", function (chunk) {
    chunks.push(chunk);
  });

  res.on("end", function () {
    var body = Buffer.concat(chunks);
    console.log(body.toString());
  });
});

req.write(qs.stringify({}));
req.end();
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "userId=YourUsername&password=YourPassword&format=json");
Request request = new Request.Builder()
  .url("https://www.smsgateway.center/SMSApi/rest/balanceValidityCheck")
  .post(body)
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://www.smsgateway.center/SMSApi/rest/balanceValidityCheck?userId=YourUsername&password=YourPassword&format=json")
  .get()
  .addHeader("content-type", "application/x-www-form-urlencoded")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();
<?xml version="1.0" encoding="UTF-8"?>
<Balance>
	<userId>YOURUSERNAME</userId>
	<password>YOURPASSWORD</password>
	<format>xml</format>
</Balance>

Response

{
    "status": "success",
    "accountStatus": "Active",
    "smsBalance": 1028,
    "expireDate": "2018-04-24",
    "transactionId": "56b6cd71-833b-4a1e-aea2-754dc6632209",
    "statusCode": "900",
    "reason": "success"
}
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<balanceValidityCheckSuccessResponse>
    <accountStatus>Active</accountStatus>
    <expireDate>2018-04-24</expireDate>
    <reason>success</reason>
    <smsBalance>1028</smsBalance>
    <status>success</status>
    <statusCode>900</statusCode>
    <transactionId>63b08a51-f9b5-4937-a368-a0ad006c084c</transactionId>
</balanceValidityCheckSuccessResponse>
status=success | accountStatus=Active | smsBalance=1028 | expireDate=2018-04-24 | transactionId=dfd7725d-6c0e-48dc-9efb-b9ae16556da0 | statusCode=900 | reason=success