SMSKap DEVELOPERS
TRENARPTDE中文RUHIESFR
SMSKAP DEVELOPER API

简洁、可靠且透明的短信验证码 API。

SMSKap 开发者 API 为已审核的账户提供适用于 WhatsApp、WhatsApp Business 和 Telegram 的真实实体 SIM 卡号码,采用透明的标准目录价格,并提供全自动退款保障。

API 基础 URLhttps://api.smskap.com/v1
01 · 快速开始

三步完成系统集成

提交开发者申请,审核通过后生成 Live API 密钥,即可安全地在后端服务器中调用。

1提交申请

Submit your developer form to begin the review process.

2等待审核

Get notified once your account is reviewed and approved.

3生成 Live 密钥

Generate your live secret key and configure it on your server.

02 · 身份验证

安全 Bearer Token 身份验证

在每次请求中通过 Authorization: Bearer <key> 请求头传递密钥。私密密钥仅在创建时显示一次。

curl https://api.smskap.com/v1/account \
  -H "Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxxx"
切勿在浏览器端代码或公开代码库中暴露您的 Live API 密钥。
03 · 账户与余额

账户与余额查询

调用 GET /v1/account 可获取当前余额、货币单位 (TRY) 以及分配的速率与激活配额。

GET/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"
}
04 · 目录与价格

标准服务与国家目录

我们的基础设施专注于 3 种高成功率核心服务和 3 个全球主要国家,底层运营商路由引擎会自动分配合适的优质实体卡号码。

Supported Services

WhatsApp whatsapp
WhatsApp Business whatsapp-business
Telegram telegram

Supported Countries

Türkiye (+90) tr
United States (+1) us
United Kingdom (+44) gb
公开透明的标准目录计费

无任何隐性加价。所有 API 请求直接按照公开目录标准计费。对于高用量合作伙伴,管理员可在后台为其配置专属折扣。GET /v1/offers 返回已应用折扣的实时净价。

GET/v1/countries可用国家 (TR, US, GB)
GET/v1/services可用服务 (WhatsApp, WhatsApp Business, Telegram)
GET/v1/offers实时价格与库存
05 · 激活 API

号码预订、SMS 查询与退款流程

预订号码、轮询接收验证码,或在规定时限内取消。若未收到验证码,扣减金额将全自动立即退回账户余额。

POST/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"
}
GET/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"
}
DELETE/v1/activations/{activation_id}取消并退款 (DELETE /v1/activations/{id})
06 · 官方 PYTHON SDK 集成

官方 Python SDK 集成

Integrate in seconds using our official open-source Python SDK with automated polling and refund handling:

pip install smskap
from 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}")

GitHub Repository & Source Code ➔

07 · 限制与安全

可观察性、配额与安全性

API 调用受到后台可实时监控与调整的安全配额保护。

每分钟请求上限

限制每分钟请求频次(如 60 次/分),超限时返回 429 及 Retry-After。

每日激活配额

单个自然日允许的最大激活总数,可根据业务规模申请提升。

请求追踪 ID (request_id)

每个响应中携带的唯一标识,便于技术排查与售后支持。

幂等性 (Idempotency-Key): POST 激活请求中必须携带的 UUID 请求头,避免因网络重试导致重复扣费。
08 · 错误代码

标准错误代码表

所有错误均以规范的 JSON 结构返回。请在业务代码中针对 error.code 进行处理。

HTTP错误标识 (error.code)原因说明与解决方案
400invalid_payloadMissing or invalid payload (service_key or country_code outside supported catalog).
400insufficient_balanceAccount balance is insufficient. Top up balance in the user panel.
400cancel_window_expiredCancellation window expired or SMS code already delivered; cannot be cancelled.
401invalid_api_keyInvalid, missing or revoked Bearer API key.
403forbiddenDeveloper application pending approval or suspended.
404no_numbers_availableNo numbers available right now for this service and country. Please retry shortly.
404activation_not_foundThe requested activation ID does not exist.
409activation_conflictConflict detected on activation or duplicate idempotency key.
429rate_limit_exceededRate limit exceeded. Wait the number of seconds specified in the Retry-After header.
429daily_activation_limit_exceededDaily activation quota reached. Contact support to request a quota increase.
503service_temporarily_unavailableCarrier network is temporarily unavailable. Please retry shortly.