SMS verification API
NuvioSMS API handles number purchases, code checks, cancellations, and credit/price queries in a single HTTP request. Using the industry-standard handler_api method, just replace the endpoint and API key in your existing code to connect instantly.
GET /stubs/handler_api.php
?api_key=API_KEY&action=getNumber
&service=telegram&country=gb
ACCESS_NUMBER:NV8Q2K7:447700900123
GET ...&action=getStatus&id=NV8Q2K7
STATUS_OK:48215- Industry standard method
- handler_api
- Per API key
- 300 per minute
- Country / Service
- 145 / 1,255
- Auto refund if no code by then
- 20 min
Industry standard method
Per API key
Country / Service
Auto refund if no code by then
How do I get an API key?
After logging in, create a key in the API menu on the Account screen. The key is shown only once when created, so save it right away. The API uses the same credit and prices as the website.
What is the base address?
All requests are sent as GET to the same address with api_key and action parameters.
https://nuviosms.com/stubs/handler_api.php?api_key=API_KEY&action=...
What requests can I send?
7 types of requests covering number purchase, code verification, cancellation, and credit checks.
| action | What it does | Sample response |
|---|---|---|
| getBalance | Check credit | ACCESS_BALANCE:12.50 |
| getPrices&service=telegram&country=gb | Prices and available numbers by service and country | {"gb":{"telegram":{"cost":0.207,"count":8877728}}} |
| getNumber&service=telegram&country=gb | Buy a number | ACCESS_NUMBER:ID:PHONE |
| getStatus&id=ID | Check code | STATUS_WAIT_CODE / STATUS_OK:CODE |
| setStatus&id=ID&status=8 | Cancel number (before a code arrives, full refund) | ACCESS_CANCEL |
| setStatus&id=ID&status=3 | Get one more code on the same number | ACCESS_RETRY_GET |
| setStatus&id=ID&status=6 | Finish | ACCESS_ACTIVATION |
Parameter
| Name | Required | Description |
|---|---|---|
| api_key | All | API key created on the Account screen |
| action | All | getBalance, getPrices, getNumber, getStatus, setStatus |
| service | getNumber | Service code (e.g. telegram, whatsapp, google). Same as the services page URL |
| country | getNumber | Two-letter country code (e.g. gb, us, id) |
| id | getStatus, setStatus | Number ID returned by getNumber (starts with N-) |
| status | setStatus | 8 cancel, 3 one more code, 6 finish, 1 ready |
Response text and meaning
Responses come as short text. We also indicate if credit was deducted.
| Response | Meaning | Money |
|---|---|---|
| ACCESS_NUMBER:ID:PHONE | You got a number | Number price is charged |
| STATUS_WAIT_CODE | Waiting for the code | Unchanged |
| STATUS_OK:CODE | Code received | Payment complete |
| STATUS_WAIT_RETRY:CODE | Waiting for the next code (previous codes included) | No extra cost |
| STATUS_CANCEL | Cancelled or time is up | Refunded if no code arrived |
| ACCESS_CANCEL | Cancelled | Full refund |
| ACCESS_RETRY_GET | Waiting for one more code on the same number | No extra cost |
| ACCESS_ACTIVATION | You finished using the number | Unchanged |
| NO_BALANCE | Get it right after you top up | Not charged |
| NO_NUMBERS | Numbers for that country are not available right now | Not charged |
| NO_ACTIVATIONS | You have 20 open numbers | Not charged |
| EARLY_CANCEL_DENIED | For numbers with a code, finish (6) instead of cancelling | Unchanged |
| BAD_KEY | Invalid API key | Not charged |
| BAD_SERVICE / BAD_COUNTRY | Invalid service or country code | Not charged |
| NO_ACTIVATION | Number ID not found | Unchanged |
| TOO_MANY_REQUESTS | Exceeded 300 requests per minute | Not charged |
How does API code retrieval work?
4 simple steps: get a number, enter it, check the code, and you're done.
- Step 1
Get a number
Call getNumber with service and country to get a number.
action=getNumber&service=telegram&country=gb > ACCESS_NUMBER:NV8Q2K7:447700900123
- Step 2
Enter number
Enter the received number in the signup form or your program.
+44 7700 900123
- Step 3
Check code
Poll getStatus every 5 seconds to check for codes.
action=getStatus&id=NV8Q2K7 > STATUS_OK:48215
- Step 4
Finish
Once you have entered the code, finish with setStatus 6. If no code arrives within 20 minutes, the number is refunded automatically.
action=setStatus&id=NV8Q2K7&status=6 > ACCESS_ACTIVATION
Examples by language
The full flow from getting a number to receiving the code. Switch tabs to change the programming language.
# Balance
curl "https://nuviosms.com/stubs/handler_api.php?api_key=API_KEY&action=getBalance"
# Get a number (Telegram, United Kingdom)
curl "https://nuviosms.com/stubs/handler_api.php?api_key=API_KEY&action=getNumber&service=telegram&country=gb"
# ACCESS_NUMBER:N-8Q2K7XLM:447700900123
# Check the code (every 5 seconds)
curl "https://nuviosms.com/stubs/handler_api.php?api_key=API_KEY&action=getStatus&id=N-8Q2K7XLM"
# STATUS_WAIT_CODE or STATUS_OK:48215
# Finish (6) / Cancel (8, full refund before a code)
curl "https://nuviosms.com/stubs/handler_api.php?api_key=API_KEY&action=setStatus&id=N-8Q2K7XLM&status=6"import time, requests
BASE = "https://nuviosms.com/stubs/handler_api.php"
KEY = "API_KEY"
def call(**p):
return requests.get(BASE, params={"api_key": KEY, **p}, timeout=30).text
r = call(action="getNumber", service="telegram", country="gb")
if not r.startswith("ACCESS_NUMBER"):
raise SystemExit(r)
_, num_id, phone = r.split(":")
print("Number:", phone)
for _ in range(240): # 20 minutes
s = call(action="getStatus", id=num_id)
if s.startswith("STATUS_OK"):
print("Code:", s.split(":")[1])
call(action="setStatus", id=num_id, status=6)
break
time.sleep(5)// Node.js 18+
const BASE = "https://nuviosms.com/stubs/handler_api.php";
const KEY = "API_KEY";
const call = (p) => fetch(BASE + "?" + new URLSearchParams({ api_key: KEY, ...p })).then((r) => r.text());
const r = await call({ action: "getNumber", service: "telegram", country: "gb" });
if (!r.startsWith("ACCESS_NUMBER")) throw new Error(r);
const [, id, phone] = r.split(":");
console.log("Number:", phone);
for (let i = 0; i < 240; i++) {
const s = await call({ action: "getStatus", id });
if (s.startsWith("STATUS_OK")) {
console.log("Code:", s.split(":")[1]);
await call({ action: "setStatus", id, status: "6" });
break;
}
await new Promise((ok) => setTimeout(ok, 5000));
}<?php
$base = "https://nuviosms.com/stubs/handler_api.php";
$key = "API_KEY";
function call($p) { global $base, $key;
return file_get_contents($base . "?" . http_build_query(["api_key" => $key] + $p)); }
$r = call(["action" => "getNumber", "service" => "telegram", "country" => "gb"]);
if (strpos($r, "ACCESS_NUMBER") !== 0) exit($r);
[, $id, $phone] = explode(":", $r);
echo "Number: $phone\n";
for ($i = 0; $i < 240; $i++) {
$s = call(["action" => "getStatus", "id" => $id]);
if (strpos($s, "STATUS_OK") === 0) {
echo "Code: " . explode(":", $s)[1] . "\n";
call(["action" => "setStatus", "id" => $id, "status" => 6]);
break;
}
sleep(5);
}package main
import ("fmt"; "io"; "net/http"; "net/url"; "strings"; "time")
const base = "https://nuviosms.com/stubs/handler_api.php"
const key = "API_KEY"
func call(p url.Values) string {
p.Set("api_key", key)
r, _ := http.Get(base + "?" + p.Encode())
defer r.Body.Close()
b, _ := io.ReadAll(r.Body)
return string(b)
}
func main() {
r := call(url.Values{"action": {"getNumber"}, "service": {"telegram"}, "country": {"gb"}})
if !strings.HasPrefix(r, "ACCESS_NUMBER") { fmt.Println(r); return }
f := strings.Split(r, ":")
fmt.Println("Number:", f[2])
for i := 0; i < 240; i++ {
s := call(url.Values{"action": {"getStatus"}, "id": {f[1]}})
if strings.HasPrefix(s, "STATUS_OK") {
fmt.Println("Code:", strings.Split(s, ":")[1])
call(url.Values{"action": {"setStatus"}, "id": {f[1]}, "status": {"6"}})
return
}
time.Sleep(5 * time.Second)
}
}import java.net.URI; import java.net.URLEncoder; import java.net.http.*;
import java.nio.charset.StandardCharsets; import java.util.Map; import java.util.stream.Collectors;
public class Nuvio {
static final String BASE = "https://nuviosms.com/stubs/handler_api.php", KEY = "API_KEY";
static final HttpClient http = HttpClient.newHttpClient();
static String call(Map<String, String> p) throws Exception {
String q = p.entrySet().stream().map(e -> e.getKey() + "=" + URLEncoder.encode(e.getValue(), StandardCharsets.UTF_8)).collect(Collectors.joining("&"));
return http.send(HttpRequest.newBuilder(URI.create(BASE + "?api_key=" + KEY + "&" + q)).build(), HttpResponse.BodyHandlers.ofString()).body();
}
public static void main(String[] a) throws Exception {
String r = call(Map.of("action", "getNumber", "service", "telegram", "country", "gb"));
if (!r.startsWith("ACCESS_NUMBER")) { System.out.println(r); return; }
String[] f = r.split(":");
System.out.println("Number: " + f[2]);
for (int i = 0; i < 240; i++) {
String s = call(Map.of("action", "getStatus", "id", f[1]));
if (s.startsWith("STATUS_OK")) { System.out.println("Code: " + s.split(":")[1]); call(Map.of("action", "setStatus", "id", f[1], "status", "6")); return; }
Thread.sleep(5000);
}
}
}using System.Net.Http;
const string Base = "https://nuviosms.com/stubs/handler_api.php";
const string Key = "API_KEY";
var http = new HttpClient();
async Task<string> Call(string q) => await http.GetStringAsync($"{Base}?api_key={Key}&{q}");
var r = await Call("action=getNumber&service=telegram&country=gb");
if (!r.StartsWith("ACCESS_NUMBER")) { Console.WriteLine(r); return; }
var f = r.Split(':');
Console.WriteLine($"Number: {f[2]}");
for (var i = 0; i < 240; i++)
{
var s = await Call($"action=getStatus&id={f[1]}");
if (s.StartsWith("STATUS_OK"))
{
Console.WriteLine($"Code: {s.Split(':')[1]}");
await Call($"action=setStatus&id={f[1]}&status=6");
break;
}
await Task.Delay(5000);
}API FAQs
Access 1,255 services in 145 countries via API at same prices as web.
- What is SMS verification API?
- This feature allows you to purchase virtual numbers, verify authentication codes, and cancel via HTTP requests in your program. The NuvioSMS API follows the widely-used handler_api method in the industry.
- Can I use the same programs from other SMS verification sites?
- For handler_api systems, just update the base URL and API key.
- Is there a separate API fee?
- None. API and web interface use the same credit system and pricing.
- How many requests can I send?
- Each API key allows 300 requests per minute. Exceeding this returns TOO_MANY_REQUESTS without deducting credit.
- Can numbers bought via API be refunded?
- Yes. If no code arrives within 20 minutes, numbers purchased via API are automatically refunded as credit.
- Where do I create an API key?
- Create it in the API menu after logging into your account. Keys are shown only once upon creation - save it immediately.
Create an API key and connect right away
After signing up and topping up credit, create your API key directly in the account screen.