简洁、可靠且透明的短信验证码 API。
SMSKap 开发者 API 为已审核的账户提供适用于 WhatsApp、WhatsApp Business 和 Telegram 的真实实体 SIM 卡号码,采用透明的标准目录价格,并提供全自动退款保障。
https://api.smskap.com/v1三步完成系统集成
提交开发者申请,审核通过后生成 Live API 密钥,即可安全地在后端服务器中调用。
Submit your developer form to begin the review process.
Get notified once your account is reviewed and approved.
Generate your live secret key and configure it on your server.
安全 Bearer Token 身份验证
在每次请求中通过 Authorization: Bearer <key> 请求头传递密钥。私密密钥仅在创建时显示一次。
curl https://api.smskap.com/v1/account \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"账户与余额查询
调用 GET /v1/account 可获取当前余额、货币单位 (TRY) 以及分配的速率与激活配额。
/v1/account需已获批的 Live 密钥{
"account": { "balance": 450.00, "currency": "TRY" },
"application": {
"name": "Production Bot",
"status": "approved",
"requests_per_minute": 60,
"daily_activation_limit": 200,
"currency": "TRY"
},
"environment": "live",
"request_id": "req_01J8SMSKAP123456789"
}标准服务与国家目录
我们的基础设施专注于 3 种高成功率核心服务和 3 个全球主要国家,底层运营商路由引擎会自动分配合适的优质实体卡号码。
Supported Services
whatsappwhatsapp-businesstelegramSupported Countries
trusgb无任何隐性加价。所有 API 请求直接按照公开目录标准计费。对于高用量合作伙伴,管理员可在后台为其配置专属折扣。GET /v1/offers 返回已应用折扣的实时净价。
/v1/countries可用国家 (TR, US, GB)/v1/services可用服务 (WhatsApp, WhatsApp Business, Telegram)/v1/offers实时价格与库存号码预订、SMS 查询与退款流程
预订号码、轮询接收验证码,或在规定时限内取消。若未收到验证码,扣减金额将全自动立即退回账户余额。
/v1/activations预订号码 (POST /v1/activations)curl -X POST https://api.smskap.com/v1/activations \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
-H "Idempotency-Key: e9b8d2e1-4567-4d89-b123-987654321abc" \
-H "Content-Type: application/json" \
-d '{
"service_key": "whatsapp",
"country_code": "tr"
}'{
"activation": {
"id": "AKT-260827-ABC123",
"status": "waiting_code",
"service_key": "whatsapp",
"service_name": "WhatsApp",
"country_code": "tr",
"country_name": "Türkiye",
"number": "+905301234567",
"code": null,
"sale_amount": 40.50,
"currency": "TRY",
"expires_at": "2026-10-19T21:05:00Z",
"cancellable_at": "2026-10-19T20:47:00Z",
"poll_interval_seconds": 3
},
"request_id": "req_01J8SMSKAP123456789"
}/v1/activations/{activation_id}获取短信验证码 (GET /v1/activations/{id})curl https://api.smskap.com/v1/activations/AKT-260827-ABC123 \
-H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"{
"activation": {
"id": "AKT-260827-ABC123",
"status": "code_received",
"code": "482910",
"sale_amount": 40.50,
"currency": "TRY"
},
"request_id": "req_01J8SMSKAP123456789"
}/v1/activations/{activation_id}取消并退款 (DELETE /v1/activations/{id})官方 Python SDK 集成
Integrate in seconds using our official open-source Python SDK with automated polling and refund handling:
pip install smskapfrom smskap import SMSKapClient, SMSKapError
client = SMSKapClient(api_key="sk_live_xxxxxxxxxxxxxxxxxxxxxxxx")
try:
# 1. Numara rezerve et (WhatsApp / Türkiye)
act = client.create_activation(service="whatsapp", country="tr")
print(f"Tahsis edilen numara: {act['number']} (ID: {act['id']})")
# 2. SMS kodunu otomatik dinle (120 saniyeye kadar)
code = client.wait_for_code(activation_id=act["id"], timeout=120)
if code:
print(f"SMS Doğrulama Kodu: {code}")
else:
# Kod gelmezse iptal et; bakiye anında iade edilir
client.cancel_activation(act["id"])
print("Süre doldu, rezervasyon iptal edildi ve bakiye iade edildi.")
except SMSKapError as e:
print(f"Hata [{e.code}]: {e.message}")可观察性、配额与安全性
API 调用受到后台可实时监控与调整的安全配额保护。
限制每分钟请求频次(如 60 次/分),超限时返回 429 及 Retry-After。
单个自然日允许的最大激活总数,可根据业务规模申请提升。
每个响应中携带的唯一标识,便于技术排查与售后支持。
标准错误代码表
所有错误均以规范的 JSON 结构返回。请在业务代码中针对 error.code 进行处理。
| HTTP | 错误标识 (error.code) | 原因说明与解决方案 |
|---|---|---|
| 400 | invalid_payload | Missing or invalid payload (service_key or country_code outside supported catalog). |
| 400 | insufficient_balance | Account balance is insufficient. Top up balance in the user panel. |
| 400 | cancel_window_expired | Cancellation window expired or SMS code already delivered; cannot be cancelled. |
| 401 | invalid_api_key | Invalid, missing or revoked Bearer API key. |
| 403 | forbidden | Developer application pending approval or suspended. |
| 404 | no_numbers_available | No numbers available right now for this service and country. Please retry shortly. |
| 404 | activation_not_found | The requested activation ID does not exist. |
| 409 | activation_conflict | Conflict detected on activation or duplicate idempotency key. |
| 429 | rate_limit_exceeded | Rate limit exceeded. Wait the number of seconds specified in the Retry-After header. |
| 429 | daily_activation_limit_exceeded | Daily activation quota reached. Contact support to request a quota increase. |
| 503 | service_temporarily_unavailable | Carrier network is temporarily unavailable. Please retry shortly. |