API 文档
使用 SimNoKYC API 自动化SMS验证流程。购买虚拟电话号码、接收SMS验证码、租用专属号码并管理订单——全部以编程方式完成。
需要身份验证。 所有 API 请求使用基于 cookie 的会话身份验证。您必须登录 SimNoKYC 账户才能使用 API。通过 Web 界面登录或使用身份验证端点建立会话。
身份验证
API 使用基于 cookie 的会话身份验证 。要以编程方式进行身份验证:
发送 POST 请求到 /auth-api.php,附上您的 seed 短语
保存响应中的会话 cookie
在所有后续 API 请求中包含该 cookie
POST
/auth-api.php
使用您的 seed 短语进行身份验证并建立会话。
参数 类型 必需 描述
action string 必填 必须为 "login"
seed string 必填 您的 16 字符访问 seed(例如 AbC3-dEf4-gHj5-kLm6)
复制
# Login and save session cookie
curl -X POST https://simnokyc.com/auth-api.php \
-d "action=login&seed=AbC3-dEf4-gHj5-kLm6" \
-c cookies.txt
import requests
session = requests.Session()
resp = session.post("https://simnokyc.com/auth-api.php" , data={
"action" : "login" ,
"seed" : "AbC3-dEf4-gHj5-kLm6"
})
data = resp.json()
print (data) # {"success": true, "user": {...}}
# session object now holds the cookie for all future requests
const resp = await fetch("https://simnokyc.com/auth-api.php" , {
method: "POST" ,
credentials: "include" ,
headers: { "Content-Type" : "application/x-www-form-urlencoded" },
body: "action=login&seed=AbC3-dEf4-gHj5-kLm6"
});
const data = await resp.json();
console.log(data); // {success: true, user: {...}}
成功响应
{
"success" : true ,
"user" : {
"id" : 42 ,
"prefix" : "AbC3" ,
"balance" : "74.50"
}
}
错误响应
{
"success" : false ,
"error" : "Invalid seed."
}
基础 URL
所有 API 端点相对于:
https://simnokyc.com/api.php?action={action}
所有响应均为 JSON 格式。POST 端点接受 application/json 和 application/x-www-form-urlencoded 请求体。
速率限制
API 执行以下速率限制:
端点 限制 时间窗口
身份验证 5 次尝试 15 分钟
所有其他端点 无硬性限制 —
频率限制 :身份验证限制为每 15 分钟 5 次尝试。其他端点目前没有频率限制,但过度使用可能会被限流。请使用合理的请求间隔。
错误处理
所有错误返回一个包含 <code>error</code> 字段的 JSON 对象:
{
"error" : "Description of what went wrong"
}
HTTP 状态码 含义
200 成功(请检查响应体中的应用级错误)
403 无效的 CSRF 令牌
405 错误的 HTTP 方法(例如在仅限 POST 的端点使用 GET)
429 超出频率限制
常见的应用级错误:
错误 原因
"Login required"会话已过期或未认证
"Insufficient balance"资金不足 — 包含 need 和 have 字段
"Service not available for this country"所选国家无库存或服务未激活
"Missing country or service"未提供必需参数
获取国家列表
GET
/api.php?action=countries
返回所有拥有可用虚拟号码的活跃国家。无需身份验证。
复制
curl https://simnokyc.com/api.php?action=countries
resp = session.get("https://simnokyc.com/api.php" , params={"action" : "countries" })
countries = resp.json()
for c in countries:
print (c["code" ], c["name" ])
const resp = await fetch("https://simnokyc.com/api.php?action=countries" );
const countries = await resp.json();
响应
[
{ "id" : 1 , "code" : "us" , "name" : "USA" },
{ "id" : 2 , "code" : "gb" , "name" : "UK" },
{ "id" : 3 , "code" : "de" , "name" : "Germany" }
]
获取服务列表
GET
/api.php?action=services&country={code}
返回特定国家的可用服务,包括价格和库存。不指定国家代码时,返回所有服务但不含价格。
参数 类型 必需 描述
country string 可选 ISO 3166-1 alpha-2 国家代码(例如 us、gb、de)
响应(含国家)
[
{
"id" : 12 ,
"name" : "WhatsApp" ,
"slug" : "whatsapp" ,
"icon_code" : "WA" ,
"icon_color" : "#25d366" ,
"category" : "social" ,
"price" : "0.35" ,
"stock" : 847
}
]
获取运营商列表
GET
/api.php?action=operators&country={code}
返回特定国家的可用运营商。每个运营商有一个类型和应用于基础服务价格的价格倍率。
参数 类型 必需 描述
country string 必填 ISO 3166-1 alpha-2 国家代码
响应
[
{
"id" : 5 ,
"name" : "T-Mobile" ,
"type" : "physical" ,
"price_multiplier" : "1.50" ,
"icon_slug" : "tmobile" ,
"icon_domain" : "t-mobile.com"
}
]
运营商类型: virtual — VoIP 号码,最便宜,可能被某些服务屏蔽。physical — 实体 SIM 卡,成功率更高。premium — 最快交付(约 10 秒),成功率最高。
购买号码(SMS激活)
POST
/api.php?action=buy
购买虚拟号码用于一次性短信验证。号码有效期为 20 分钟。如果未收到短信,您的余额将自动退还。
参数 类型 必需 描述
country string 必填 国家代码(例如 us)
service_id integer 必填 来自服务列表 的服务 ID
operator_id integer 可选 来自运营商列表 的运营商 ID。留空使用默认运营商。
复制
curl -X POST https://simnokyc.com/api.php?action=buy \
-b cookies.txt \
-H "Content-Type: application/json" \
-d '{"country":"us","service_id":12,"operator_id":5}'
resp = session.post("https://simnokyc.com/api.php?action=buy" , json={
"country" : "us" ,
"service_id" : 12 ,
"operator_id" : 5
})
order = resp.json()
print (f"Order #{order['order_id']} — ${order['price']}" )
const resp = await fetch("https://simnokyc.com/api.php?action=buy" , {
method: "POST" ,
credentials: "include" ,
headers: { "Content-Type" : "application/json" },
body: JSON.stringify({ country: "us" , service_id: 12 , operator_id: 5 })
});
const order = await resp.json();
成功响应
{
"success" : true ,
"order_id" : 1847 ,
"price" : 0.53 ,
"balance" : "73.97"
}
错误:余额不足
{
"error" : "Insufficient balance" ,
"need" : 0.53 ,
"have" : "0.10"
}
列出订单
GET
/api.php?action=orders
返回您最近的 50 个订单,包括电话号码和短信验证码。轮询此端点以检查活跃订单的短信验证码。
响应
[
{
"id" : 1847 ,
"price" : "0.53" ,
"status" : "completed" ,
"phone_number" : "+12025551234" ,
"sms_code" : "847293" ,
"created_at" : "2026-04-09 14:32:00" ,
"country_code" : "us" ,
"country_name" : "USA" ,
"service_name" : "WhatsApp" ,
"operator_name" : "T-Mobile"
}
]
订单状态: active — 等待短信。completed — 已收到短信。cancelled — 用户已取消。refunded — 自动退款(超时前未收到短信)。expired — 已过期。
获取租赁价格
GET
/api.php?action=rental_price&country={code}&operator_id={id}&duration={days}
获取从特定运营商租用专用号码的价格和租期。
参数 类型 必需 描述
country string 必填 国家代码
operator_id integer 必填 运营商 ID
duration integer 必填 租用天数:7、14、30 或 90
响应
{
"price" : "12.50" ,
"duration" : 30 ,
"operator" : "T-Mobile" ,
"type" : "physical" ,
"country" : "USA"
}
租赁号码
POST
/api.php?action=rental_buy
租用一个或多个专用电话号码。该号码在整个租用期间专属于您,并可接收无限量的短信。
参数 类型 必需 描述
country string 必填 国家代码
operator_id integer 必填 运营商 ID
duration integer 必填 7、14、30 或 90 天
qty integer 可选 要租用的号码数量(1–10,默认:1)
成功响应
{
"success" : true ,
"order_ids" : [1848 , 1849 ],
"total" : 25.00 ,
"qty" : 2 ,
"unit_price" : 12.50 ,
"duration" : 30 ,
"balance" : "49.50"
}
获取用户信息
GET
/api.php?action=user
返回当前用户的账户信息和余额。用于检查身份验证状态和可用资金。
已认证
{
"logged_in" : true ,
"id" : 42 ,
"prefix" : "AbC3" ,
"balance" : "74.50"
}
未认证
{
"logged_in" : false
}
完整工作流程示例
以下是一个完整的 Python 示例,演示身份验证、查找服务、购买号码并轮询SMS验证码:
复制
import requests, time
BASE = "https://simnokyc.com"
SEED = "AbC3-dEf4-gHj5-kLm6"
s = requests.Session()
# 1. Authenticate
s.post(f"{BASE}/auth-api.php" , data={"action" : "login" , "seed" : SEED})
# 2. Check balance
user = s.get(f"{BASE}/api.php?action=user" ).json()
print (f"Balance: ${user['balance']}" )
# 3. Get services for USA
services = s.get(f"{BASE}/api.php?action=services&country=us" ).json()
whatsapp = next(svc for svc in services if svc["name" ] == "WhatsApp" )
print (f"WhatsApp: ${whatsapp['price']} ({whatsapp['stock']} in stock)" )
# 4. Buy a number
order = s.post(f"{BASE}/api.php?action=buy" , json={
"country" : "us" ,
"service_id" : whatsapp["id" ]
}).json()
print (f"Order #{order['order_id']} created" )
# 5. Poll for SMS code
for _ in range(60 ):
orders = s.get(f"{BASE}/api.php?action=orders" ).json()
my_order = next(o for o in orders if o["id" ] == order["order_id" ])
if my_order["sms_code" ]:
print (f"SMS code: {my_order['sms_code']}" )
print (f"Phone: {my_order['phone_number']}" )
break
print ("Waiting for SMS..." )
time.sleep(5 )
else :
print ("Timeout — balance will be refunded automatically" )