入门 快速开始API

5 分钟快速接入 SimSmsBox API

从注册账号、创建 API Key,到完成第一次取号与收码,一步步带你跑通 SimSmsBox 的最小可用流程。

✍️ SimSmsBox 📅 2026年5月20日

本教程带你在 5 分钟内跑通 SimSmsBox 的核心流程:取号 → 收码 → 取消(可选)

准备工作

  1. 注册并登录用户后台
  2. 在「钱包」充值少量余额(用于按单扣费)。
  3. 在「API Key」页面创建一个 Key,形如 psk_xxxxxxxx

所有接口都通过请求头 X-API-Key 鉴权。

第一步:查询某国家可用应用与价格

curl "https://api.simsmsbox.com/api/sms/shop/market?country=US&cardKind=physical" \
  -H "X-API-Key: psk_xxxxxxxx"

返回该国家下各应用(如 telegram)的实时价格与库存,其中的 service 字段就是下单要传的服务代码。

第二步:取号(创建订单)

curl -X POST https://api.simsmsbox.com/api/sms/orders/purchase \
  -H "X-API-Key: psk_xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"service":"telegram","country":"US","cardKind":"physical","rentDays":30}'

返回:

{ "orderId": 19, "phone": "+1xxxxxxxxxx", "status": "waiting" }

第三步:轮询验证码

{id} 用上一步返回的 orderId

curl https://api.simsmsbox.com/api/sms/orders/19 \
  -H "X-API-Key: psk_xxxxxxxx"

收到后,验证码在 latestCode 字段:

{ "orderId": 19, "status": "received", "latestCode": "123456" }

第四步:取消订单(可选)

没收到码想换号时可取消,未收码会自动退款:

curl -X POST https://api.simsmsbox.com/api/sms/orders/19/cancel \
  -H "X-API-Key: psk_xxxxxxxx"

下一步

← 返回教程列表