Account balance

end point: https://api.smsdev.com.br/v1/balance

Method: POST, GET ou JSON

Description: This method is used to check account balance or subaccount.


Description of parameters

Name Type Standard Required Overview
key text yes Account authentication key.

Was this article helpful to you?

			

{
	"key" : "XXXXXXXXXXXXXXXXXXXX"
}

				
			
		
			
				https://api.smsdev.com.br/v1/balance?key=SUA_CHAVE_KEY
				
			
			
    

Copy and paste in the browser

			
curl --request GET \
  --url 'https://api.smsdev.com.br/v1/balance?key=SUA_CHAVE_KEY'

		
			
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.smsdev.com.br/v1/balance?key=SUA_CHAVE_KEY",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_SSL_VERIFYPEER => 0,
));

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

curl_close($curl);

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

?>
	
		
			
HttpResponse<String> response = Unirest.get("https://api.smsdev.com.br/v1/balance?key=SUA_CHAVE_KEY").asString();


		
			

	var http = require("http");

var options = {
			"method": "GET",
			"hostname": "api.smsdev.com.br",
			"port": null,
			"path": "/v1/balance?get?key=SUA_CHAVE_KEY",
			"headers": {}
		};

		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.end();

	
		
The above method returns code in the pattern below
		
	{ 
   "situacao" : "OK",
   "saldo_sms" : "1200",
   "descricao" : "SALDO ATUAL"
}
		
	
Return description
Name Overview
situation “OK” - Successful submission
"ERROR" - Submission with error
balance_sms Balance available for SMS.
description Description of the operation or error.