Appearance
Get SMS Credibalance GET METHOD
PARAMETERS
API URL : https://api.icsms.net/creditbalance/
apikey (string : required)
apikey helps to identify the user making the request. Sign/login for your apikey
username (tring : required)
Username used to registered account
EXPECTED RESPONSE
json
status - 200 ok
{
"creditbalance": 10,
"creditexpires": "2023 12 03 06:2312",
"internationalcreditbalance": 0,
};
Javascript
js
var apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"
var myHeaders = new Headers();
myHeaders.append("Authorization", `Bearer ${apikey}`);
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
var username = "icsms"
var url = "https://api.icsms.net/creditbalance/"
fetch(`${url}?username=${username}`, requestOptions)
.then(response => response.json())
.then(result => console.log(result))
.catch(error => console.log('error', error));
NodeJS
js
const axios = require('axios');
let username = "icsms"
let apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"
let url = "https://api.icsms.net/creditbalance/"
let config = {
method: 'get',
url: `${url}?username=${username}`,
headers: {
'Authorization': `Bearer ${apikey}`
}
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
PHP
php
<?php
$curl = curl_init();
$username = "icsms";
$apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF";
$url = "https://api.icsms.net/creditbalance/";
curl_setopt_array($curl, array(
CURLOPT_URL => $url.'?username='.$username,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer '.$apikey
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Python
python
import requests
username = "icsms"
url = "https://api.icsms.net/creditbalance/"
apikey = "1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF"
headers = {
'Authorization': 'Bearer {}'.format(apikey)
}
response = requests.request("GET", "{}?username={}".format(url, username), headers=headers)
print(response.json())
C#
c#
var client = new RestClient("https://api.icsms.net/creditbalance/?username=icsms");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer 1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Java
java
String username = "icsms";
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.get("https://api.icsms.net/creditbalance/?username=icsms")
.header("Authorization", "Bearer 1W3N4KHD28YCBL8M7WDG0L11N73FP28JKD5SOKD2D4KXJKCKMF")
.asString();