Credit balance
Check how many SMS credits are left on your account with the legacy HTTP API (checksmscredits.aspx).
https://smsapi.wire2air.com/smsadmin/checksmscredits.aspxParameters
| Parameter | In | Description |
|---|---|---|
| USERID stringrequired in body | body | Your Wire2Air user ID. |
| PASSWORD stringrequired in body | body | Your Wire2Air password. |
| VASID stringrequired in body | body | Your VASID. |
Examples
curl "https://smsapi.wire2air.com/smsadmin/checksmscredits.aspx" \
--data-urlencode "USERID=YOUR_USERID" \
--data-urlencode "PASSWORD=YOUR_PASSWORD" \
--data-urlencode "VASID=YOUR_VASID"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"USERID": "YOUR_USERID",
"PASSWORD": "YOUR_PASSWORD",
"VASID": "YOUR_VASID",
})
request = urllib.request.Request(
"https://smsapi.wire2air.com/smsadmin/checksmscredits.aspx",
data=params.encode("utf-8"),
method="POST",
)
try:
with urllib.request.urlopen(request, timeout=30) as response:
print(response.status, response.read().decode("utf-8"))
except urllib.error.HTTPError as error:
print(error.code, error.read().decode("utf-8"))
const params = new URLSearchParams({
USERID: "YOUR_USERID",
PASSWORD: "YOUR_PASSWORD",
VASID: "YOUR_VASID",
});
const response = await fetch("https://smsapi.wire2air.com/smsadmin/checksmscredits.aspx", {
method: "POST",
body: params, // sent as application/x-www-form-urlencoded
});
console.log(response.status, await response.text());
<?php
$params = http_build_query([
'USERID' => 'YOUR_USERID',
'PASSWORD' => 'YOUR_PASSWORD',
'VASID' => 'YOUR_VASID',
]);
$ch = curl_init('https://smsapi.wire2air.com/smsadmin/checksmscredits.aspx');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $params,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
if ($body === false) {
echo 'Request failed: ' . curl_error($ch) . PHP_EOL;
} else {
echo curl_getinfo($ch, CURLINFO_HTTP_CODE) . ' ' . $body . PHP_EOL;
}
curl_close($ch);
using System;
using System.Collections.Generic;
using System.Net.Http;
var parameters = new Dictionary<string, string>
{
["USERID"] = "YOUR_USERID",
["PASSWORD"] = "YOUR_PASSWORD",
["VASID"] = "YOUR_VASID",
};
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://smsapi.wire2air.com/smsadmin/checksmscredits.aspx")
{
Content = new FormUrlEncodedContent(parameters),
};
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response
| Response | Meaning |
|---|---|
{CREDIT} | Your remaining SMS credits, as a number. |
ERR: 301: Failed authentication | Wrong user ID, password or VASID. |
A useful pattern is to call this before a large bulk send and stop if the balance is too low, rather than discover ERR: 305: Not enough credits part-way through.

