SMS verification API
The SNSSIM API handles number purchase, code verification, cancellation, credit, and price inquiries with a single HTTP request. Using the industry-standard handler_api method, you can connect immediately by changing only the address and API key in your existing program.
GET /stubs/handler_api.php
?api_key=API_KEY&action=getNumber
&service=telegram&country=gb
ACCESS_NUMBER:SS8Q2K7:447700900123
GET ...&action=getStatus&id=SS8Q2K7
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?
Generate API keys in your account's API menu after login. Keys appear only once - save immediately. API uses same credit and pricing as web interface.
What is the base address?
All requests are sent via GET method by adding api_key and action parameters to the same address.
https://snssim.com/stubs/handler_api.php?api_key=API_KEY&action=...
What requests can I send?
7 types of requests available: number purchase, code check, cancellation, credit balance, and more.
| 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 (full refund if no code received) | ACCESS_CANCEL |
| setStatus&id=ID&status=3 | Get additional verification code on 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). Matches values on the services list page. |
| country | getNumber | 2-letter country code (e.g. gb, us, id) |
| id | getStatus, setStatus | Number ID issued by getNumber (starts with N) |
| status | setStatus | 8 to cancel, 3 to request code again, 6 to end, 1 to prepare |
Response text and meaning
Responses are provided in concise text. Credit deduction status is also displayed.
| 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 additional verification codes (includes previous code) | No extra cost |
| STATUS_CANCEL | Cancelled or time is up | Refunded if no code arrived |
| ACCESS_CANCEL | Cancelled | Full refund |
| ACCESS_RETRY_GET | Waiting to receive code again on 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 | Currently unable to provide numbers for this country. | Not charged |
| NO_ACTIVATIONS | You have 20 open numbers | Not charged |
| EARLY_CANCEL_DENIED | For numbers that received codes, select End (6), not Cancel | Unchanged |
| BAD_KEY | Invalid API key | Not charged |
| BAD_SERVICE / BAD_COUNTRY | Incorrect 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 steps: receive number, enter it, verify code, then finish.
- Step 1
Get a number
Use getNumber to select your desired service and country to issue a number.
action=getNumber&service=telegram&country=gb > ACCESS_NUMBER:SS8Q2K7:447700900123
- Step 2
Enter number
Enter the purchased number on the sign-up page or program.
+44 7700 900123
- Step 3
Check code
Call getStatus every 5 seconds to check if the code has arrived.
action=getStatus&id=SS8Q2K7 > STATUS_OK:48215
- Step 4
Finish
After entering the code, complete with setStatus 6. Unused numbers auto-refund within 20 minutes.
action=setStatus&id=SS8Q2K7&status=6 > ACCESS_ACTIVATION
Examples by language
The full process: get a number, wait for code, then complete. Tap to change language.
# Balance
curl "https://snssim.com/stubs/handler_api.php?api_key=API_KEY&action=getBalance"
# Get a number (Telegram, United Kingdom)
curl "https://snssim.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://snssim.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://snssim.com/stubs/handler_api.php?api_key=API_KEY&action=setStatus&id=N-8Q2K7XLM&status=6"import time, requests
BASE = "https://snssim.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://snssim.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://snssim.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://snssim.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 SNSSIM {
static final String BASE = "https://snssim.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://snssim.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
The API offers numbers from 145 countries and 1,255 services at the same prices as the web interface.
- What is an SMS verification API?
- Programmatically buy numbers, check codes, and cancel via HTTP requests. SNSSIM API uses industry-standard handler_api.
- Can I keep using programs from other SMS verification sites?
- If your program uses the handler_api method, just change the base address and API key to connect immediately.
- Is there a separate API fee?
- No difference. API and web interface use the same credit and pricing.
- How many requests are allowed?
- Up to 300 requests per minute per API key. Exceeding this limit results in a TOO_MANY_REQUESTS error, and no credit is deducted.
- Can numbers bought via API be refunded?
- Yes. If the code doesn't arrive within 20 minutes, numbers purchased via API are also automatically refunded as credit.
- Where do I create an API key?
- Generate in the API menu after login. Keys are shown only once upon generation - save immediately.
Connect immediately after generating an API key
After signing up, top up your credit to generate an API key directly on the account screen.