SMS Online
服务
  • 按需长期保留同一个号码,接收任何应用发到该号码的每条短信。

  • 现成的美国 Google Voice 号码,附带其 Google 账号。

  • 现成的 Apple ID,附带登录和找回所需的一切信息。

  • 按国家提供的独享代理,适用于注册以及需要本地 IP 地址的应用。

  • 游戏、商店和流媒体兑换码,订单确认后发送到你的账户。

不确定怎么选? 虚拟号码是 10 分钟内收一个验证码。租用号码归你所有,可收多个验证码。

跳转到快速开始

API 参考

在你自己的代码中购买虚拟号码、租用号码、Google Voice 号码和礼品卡。每个调用都是一个 GET 请求,密钥放在查询参数中,并从你在网站上使用的同一个钱包扣款。

基础 URLhttps://smsonline.io/api/v1

更喜欢点点鼠标?Postman 集合已备好每个可直接发送的调用。

响应与错误

成功的调用返回 "status": 1,结果在 data 中。其他任何情况都表示调用没有生效:请阅读 msg 了解原因。

1
成功
-1
失败。除非 msg 另有说明,否则不会扣费
-2
尚未收到短信,请继续轮询
错误响应
{
  "status": -1,
  "error": "missing parameter",
  "msg": ["Insufficient inventory"]
}

账户

查看用于支付每笔购买的钱包。

GET/get-balance

返回钱包当前余额(美元)。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/get-balance" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": { "balance": "24.60" }
}

虚拟号码

用于短信验证的一次性号码。查找产品、购买,然后轮询验证码。

GET/virtual-number/get-countries

所有可购买号码的国家。将其 id 用作 countryId。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/virtual-number/get-countries" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": [
    { "id": 1, "name": "United States", "image": "https://…/us.png" },
    { "id": 7, "name": "United Kingdom", "image": "https://…/gb.png" }
  ]
}

GET/virtual-number/get-services

所有可接收验证码的应用。将其 id 用作 serviceId。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/virtual-number/get-services" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": [
    { "id": 2, "name": "Telegram", "image": "https://…/telegram.png" },
    { "id": 5, "name": "WhatsApp", "image": "https://…/whatsapp.png" }
  ]
}

GET/virtual-number/get-products

某个应用在某个国家的价格,每个运营商(operatorId 为 1 至 4)一行,显示该运营商最便宜的号码。运营商会随库存增减,因此只能使用本次调用刚返回的 operatorId 购买。

查询参数

  • apiKey必填你的 API 密钥
  • countryId必填来自“国家列表”的国家 ID
  • serviceId必填来自“服务列表”的服务 ID
curl -G "https://smsonline.io/api/v1/virtual-number/get-products" \
  -d apiKey=YOUR_API_KEY \
  -d countryId=1 \
  -d serviceId=2
响应示例
{
  "status": 1,
  "data": [
    { "countryId": 1, "serviceId": 2, "operatorId": 1, "price": "0.45" },
    { "countryId": 1, "serviceId": 2, "operatorId": 3, "price": "0.72" },
    { "countryId": 1, "serviceId": 2, "operatorId": 4, "price": "0.64" }
  ]
}

购买号码

从你的钱包扣款

GET/virtual-number/buy-service

按“产品列表”返回的价格,从所选运营商购买号码,并从你的钱包扣款。号码有效期为 10 分钟。

查询参数

  • apiKey必填你的 API 密钥
  • countryId必填国家 ID
  • serviceId必填服务 ID
  • operatorId必填来自“产品列表”的运营商 ID(1 至 4)
curl -G "https://smsonline.io/api/v1/virtual-number/buy-service" \
  -d apiKey=YOUR_API_KEY \
  -d countryId=1 \
  -d serviceId=2 \
  -d operatorId=1
响应示例
{
  "status": 1,
  "data": {
    "order_id": 918273,
    "Number": "+14155550132",
    "country_name": "United States",
    "service_name": "Telegram",
    "country_image": "https://…/us.png",
    "service_image": "https://…/telegram.png"
  }
}

GET/virtual-number/get-sms

每隔几秒轮询一次,直到验证码到达。status: -2 表示尚未收到。如果短信未及时到达,订单会失败,费用退回你的钱包。

查询参数

  • apiKey必填你的 API 密钥
  • orderId必填来自“购买号码”的 order_id
curl -G "https://smsonline.io/api/v1/virtual-number/get-sms" \
  -d apiKey=YOUR_API_KEY \
  -d orderId=918273
响应示例
{
  "status": 1,
  "code": "48213"
}

// still waiting
{ "status": -2, "error": "Sms not received", "msg": ["sms for this number is not received"] }

Google Voice

附带 Google 账号的现成美国 Google Voice 号码。

GET/google-voice/get-numbers

当前有库存的号码及其价格。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/google-voice/get-numbers" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": [
    { "id": 3321, "number": "+1 (628) 555-0147", "price": "4.90", "type": 1, "country_name": "USA" }
  ]
}

GET/google-voice/get-number

按 ID 获取列表中的一个号码。

查询参数

  • apiKey必填你的 API 密钥
  • id必填来自“号码列表”的号码 ID
curl -G "https://smsonline.io/api/v1/google-voice/get-number" \
  -d apiKey=YOUR_API_KEY \
  -d id=3321
响应示例
{
  "status": 1,
  "data": { "id": 3321, "number": "+1 (628) 555-0147", "price": "4.90", "type": 1, "country_name": "USA" }
}

购买号码

从你的钱包扣款

GET/google-voice/buy-number

购买号码、创建订单,并从你的钱包扣款。

查询参数

  • apiKey必填你的 API 密钥
  • id必填来自“号码列表”的号码 ID
curl -G "https://smsonline.io/api/v1/google-voice/buy-number" \
  -d apiKey=YOUR_API_KEY \
  -d id=3321
响应示例
{
  "status": 1,
  "data": { "order_id": 918274, "number": "+1 (628) 555-0147" }
}

租用号码

将一个号码保留数小时、数天、数周或数月,并接收发往该号码的所有短信。

GET/rent-number/get-durations

可选的租用周期,以及每个周期允许的数量。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/rent-number/get-durations" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": [
    { "type": "hour", "time": [1, 2, 4, 8, 12] },
    { "type": "day", "time": [1, 2, 3, 4, 5, 6, 7] }
  ]
}

GET/rent-number/get-countries

可租用号码的国家,价格按你指定的周期计算。

查询参数

  • apiKey必填你的 API 密钥
  • type必填hour、day、week 或 month
  • time必填该周期的数量
curl -G "https://smsonline.io/api/v1/rent-number/get-countries" \
  -d apiKey=YOUR_API_KEY \
  -d type=day \
  -d time=3
响应示例
{
  "status": 1,
  "type": "day",
  "time": "3",
  "data": [ { "id": 1, "name": "United States", "price": "2.85" } ]
}

租用号码

从你的钱包扣款

GET/rent-number/buy-number

创建待处理的租用订单,并从你的钱包扣款。订单完成后会分配号码。

查询参数

  • apiKey必填你的 API 密钥
  • countryId必填来自“国家列表”的国家 ID
  • type必填hour、day、week 或 month
  • time必填该周期的数量
curl -G "https://smsonline.io/api/v1/rent-number/buy-number" \
  -d apiKey=YOUR_API_KEY \
  -d countryId=1 \
  -d type=day \
  -d time=3
响应示例
{
  "status": 1,
  "data": { "order_id": 918275, "status": "pending", "type": "day", "time": "3" }
}

礼品卡

游戏、商店和流媒体兑换码。订单由我们的团队确认,随后显示兑换码。

GET/giftcard/get-list

所有在售礼品卡。

查询参数

  • apiKey必填你的 API 密钥
curl -G "https://smsonline.io/api/v1/giftcard/get-list" \
  -d apiKey=YOUR_API_KEY
响应示例
{
  "status": 1,
  "data": [
    { "id": 12, "brand": "Steam", "name": "Steam $20 US", "face_value": "20.00",
      "selling_price": "21.40", "currency_code": "USD", "category_name": "Games" }
  ]
}

GET/giftcard/get-detail

某张礼品卡的完整详情。

查询参数

  • apiKey必填你的 API 密钥
  • id必填来自“礼品卡列表”的礼品卡 ID
curl -G "https://smsonline.io/api/v1/giftcard/get-detail" \
  -d apiKey=YOUR_API_KEY \
  -d id=12
响应示例
{
  "status": 1,
  "data": { "id": 12, "brand": "Steam", "name": "Steam $20 US", "selling_price": "21.40" }
}

购买礼品卡

从你的钱包扣款

GET/giftcard/buy

创建待处理订单,并从你的钱包扣款。订单确认后会添加兑换码。

查询参数

  • apiKey必填你的 API 密钥
  • id必填礼品卡 ID
curl -G "https://smsonline.io/api/v1/giftcard/buy" \
  -d apiKey=YOUR_API_KEY \
  -d id=12
响应示例
{
  "status": 1,
  "data": { "order_id": 918276, "order_status": "pending" }
}

GET/giftcard/order-status

轮询订单。当 order_status 为 complete 时,会包含兑换码和序列号。

查询参数

  • apiKey必填你的 API 密钥
  • orderId必填来自“购买礼品卡”的 order_id
curl -G "https://smsonline.io/api/v1/giftcard/order-status" \
  -d apiKey=YOUR_API_KEY \
  -d orderId=918276
响应示例
{
  "status": 1,
  "data": { "order_id": 918276, "order_status": "complete", "code": "XXXX-XXXX-XXXX", "serial": "8812…" }
}

登录或注册

输入你的邮箱。我们会让你登录,新用户则自动创建账户。