接码 API

通过一个 JSON API 购买号码并读取验证码。没有身份核验,加密货币付款。

REST · JSONOpenAPI 3.1 OpenAPI 规范 →

这里的每一个操作同时也是一个 MCP 工具。REST 接口是 MCP 服务器所暴露的同一批工具的映射:因此自主智能体和普通集成的行为完全一致。如果您要把 AI 智能体接到 OTPDrop,请从面向智能体的章节开始。

这个 API 是怎么组织的?

  1. 创建账户并保存返回的助记词。它是唯一的凭证,而且无法重置。
  2. 创建一笔充值,转入加密货币,等待到账。
  3. 为想要的服务和国家购买号码 —— 余额会立即被扣除。
  4. 轮询含验证码的短信。如果订单到期前没有验证码到达,钱会自动退回。

充值一次,多次购买:一笔充值可以覆盖余额允许的任意数量的号码,因此只有第一次购买需要等待 确认。

认证

把账户的助记词作为 bearer 令牌传递。没有单独的 API 密钥,也没有登录调用 —— 助记词就是 凭证。

Authorization: Bearer YOUR-SEED-PHRASE

目录类接口不需要任何认证:因此服务、国家和价格在还没有账户时就能查看。所有涉及钱和订单的操作 都需要这个请求头。

助记词无法找回。我们只保存它的指纹。如果您弄丢了它,账户和其中的余额就会消失, 没有重置,客服也无能为力。

基础地址

所有接口都相对于:

https://otpdrop.com/api/v1

响应为 JSON。POST 请求体接受 application/json 或 application/x-www-form-urlencoded。

错误

失败时会返回一个非 2xx 状态码,附带单个错误对象。

{
  "error": {
    "code": "invalid_request",
    "message": "unknown service: \"whatsap\""
  }
}
状态码含义
200成功
201已创建 —— 账户、充值或订单现已存在
401Authorization 请求头中缺少助记词或助记词不正确
422请求可以理解,但无法执行
500我们这边出了故障

422 的常见消息:

消息原因
insufficient_funds余额低于价格 —— 请先创建一笔充值
unknown service该服务代码不存在;请查看服务列表
unknown country该国家代码不存在;请查看国家列表
unknown coin不接受该币种;请查看充值接口
amount_usd must be between…充值限额为 $25–$1000

有频率限制吗?

我们没有公布配额,也没有可以限流的 API 密钥 —— 但循环调用接口并不是免费的。其中有两个接口 本来就是拿来轮询的,需要特别注意。

接口合理频率原因
目录与算价请在自己这边缓存价格很少变动;每次请求都重新拉取目录毫无 意义。
/topups/{id}每 10 到 15 秒一次网络确认要几分钟,而不是 几毫秒。问得更勤也不会更早知道结果。
/orders/{id}/sms每 3 到 5 秒一次验证码通常几秒内到达; 更紧的循环只会增加负载。
购买按需每次购买都会花掉真金白银,因此没有节制的循环让您付出的代价 比我们更大。

看起来像攻击的流量会在上游被拦截,而不会礼貌地返回 429。如果您有正当理由需要更 频繁地请求,请先通过联系页面告诉我们。

列出服务

GET/api/v1/services

所有服务及其代码、分类和最低价格。无需认证。

请求

curl -s https://otpdrop.com/api/v1/services

响应

{
  "services": [
    {
      "code": "binance",
      "name": "Binance",
      "category": "Finance",
      "from_price_cents": 85,
      "color": "#F0B90B",
      "icon": "binance"
    }
  ],
  "count": 133
}

列出国家

GET/api/v1/countries

Every country with its dial code and how many services are available there. No authentication required.

请求

curl -s https://otpdrop.com/api/v1/countries

响应

{
  "countries": [
    {
      "code": "us",
      "name": "United States",
      "dial_code": "+1",
      "service_count": 133
    }
  ],
  "count": 197
}

价格矩阵

GET/api/v1/catalog

The most useful service and country combinations with their prices, cheapest first. No authentication required.

参数

名称类型说明
limitinteger可选How many rows to return, 1 to 500. Defaults to 12.

请求

curl -s 'https://otpdrop.com/api/v1/catalog?limit=2'

响应

{
  "items": [
    {
      "service": "badoo",
      "country": "us",
      "price_cents": 35
    }
  ],
  "count": 2
}

查询价格

GET/api/v1/quote

The exact price for one service and country before you commit to buying. No authentication required.

参数

名称类型说明
servicestring必填Service code, e.g. telegram
countrystring必填Country code, e.g. us

请求

curl -s 'https://otpdrop.com/api/v1/quote?service=telegram&country=us'

响应

{
  "service": "telegram",
  "country": "us",
  "price_cents": 111,
  "price_usd": "1.11",
  "currency": "USD",
  "purchasable": true
}

创建账户

POST/api/v1/accounts

Generates an account and returns its seed. This is the only time the seed is ever shown. No authentication required.

请求

curl -s -X POST https://otpdrop.com/api/v1/accounts

响应

{
  "public_id": "acc_7f3c1a92",
  "seed": "PABh-ZbRt-9xKm-Lq4V",
  "seed_prefix": "PABh",
  "balance_cents": 0,
  "warning": "This seed is shown exactly once, right now..."
}

创建充值

POST/api/v1/topups

Claims a deposit address and returns the exact amount to send, as coin_amount, at the rate in rate_usd. Each top-up gets its own address, and it expires at expires_at. Send only the named coin, on the named network, before then.

参数

名称类型说明
amount_usdnumber必填How much to add to the balance, in USD. Minimum 25, maximum 1000.
coinstring必填BTC, LTC, ETH, XMR, SOL, TRX, BNB, USDT, USDC and more

请求

curl -s -X POST https://otpdrop.com/api/v1/topups \
  -H 'Authorization: Bearer YOUR-SEED' \
  -H 'content-type: application/json' \
  -d '{"amount_usd": 25, "coin": "XMR"}'

响应

{
  "topup_id": "top_019195919c80fc8f",
  "status": "awaiting_payment",
  "coin": "XMR",
  "address": "89Rm4XN39m9PCr8Sr3yAFnXvLRRWQVEE...",
  "amount_cents": 2500,
  "amount_usd": "25.00",
  "coin_amount": "0.1337",
  "rate_usd": 187.02,
  "bonus_cents": 0,
  "credited_total_cents": 2500,
  "expires_at": 1788532810
}

充值状态

GET/api/v1/topups/{id}

Whether a deposit has been credited. Confirmation is not instant — poll this rather than assuming the funds arrived.

参数

名称类型说明
idstring必填The top-up id, in the path

请求

curl -s https://otpdrop.com/api/v1/topups/top_019195919c80fc8f \
  -H 'Authorization: Bearer YOUR-SEED'

响应

{
  "topup_id": "top_019195919c80fc8f",
  "status": "credited",
  "coin": "XMR",
  "amount_usd": "25.00",
  "coin_amount": "0.1337",
  "credited_total_cents": 2500,
  "expires_at": 1788532810
}

购买号码

POST/api/v1/orders

Debits the balance and issues a number immediately. There is no per-purchase address and no second wait. Fails with insufficient_funds if the balance is short.

参数

名称类型说明
servicestring必填Service code, e.g. telegram
countrystring必填Country code, e.g. us

请求

curl -s -X POST https://otpdrop.com/api/v1/orders \
  -H 'Authorization: Bearer YOUR-SEED' \
  -H 'content-type: application/json' \
  -d '{"service": "telegram", "country": "us"}'

响应

{
  "order_id": "ord_1ad450bf7a42519c",
  "service": "telegram",
  "country": "us",
  "phone": "+15558329008",
  "status": "paid",
  "price_usd": "1.11"
}

列出您的订单

GET/api/v1/orders

Every order on the account, newest first, with status, number and price. Useful for reconciling state after a restart rather than for polling.

请求

curl -s https://otpdrop.com/api/v1/orders \
  -H 'Authorization: Bearer YOUR-SEED'

响应

{
  "orders": [
    {
      "order_id": "ord_1ad450bf7a42519c",
      "service": "telegram",
      "country": "us",
      "phone": "+15558329008",
      "status": "paid",
      "price_usd": "1.11"
    }
  ],
  "count": 1
}

查看订单

GET/api/v1/orders/{id}

The current state of one order: its number, status and price.

参数

名称类型说明
idstring必填The order id, in the path

请求

curl -s https://otpdrop.com/api/v1/orders/ord_1ad450bf7a42519c \
  -H 'Authorization: Bearer YOUR-SEED'

响应

{
  "order_id": "ord_1ad450bf7a42519c",
  "service": "telegram",
  "country": "us",
  "phone": "+15558329008",
  "status": "paid",
  "price_usd": "1.11"
}

获取含验证码的短信

GET/api/v1/orders/{id}/sms

Poll this until arrived turns true. If the order expires with nothing delivered, the price returns to your balance automatically.

参数

名称类型说明
idstring必填The order id, in the path

请求

curl -s https://otpdrop.com/api/v1/orders/ord_1ad450bf7a42519c/sms \
  -H 'Authorization: Bearer YOUR-SEED'

响应

{
  "order_id": "ord_1ad450bf7a42519c",
  "status": "paid",
  "arrived": false,
  "code": null
}

一次完整的集成是什么样的?

从账户到验证码,六次调用。下面的一切都是真实可用的:复制粘贴就能运行。

# 1. 创建账户并保存助记词
SEED=$(curl -s -X POST https://otpdrop.com/api/v1/accounts | jq -r .seed)

# 2. 充值 —— 把 coin_amount 转到返回的地址
curl -s -X POST https://otpdrop.com/api/v1/topups \
  -H "Authorization: Bearer \$SEED" \
  -H 'content-type: application/json' \
  -d '{"amount_usd": 25, "coin": "USDT"}'

# 3. 轮询直到充值到账
curl -s https://otpdrop.com/api/v1/topups/TOPUP_ID \
  -H "Authorization: Bearer \$SEED" | jq .status

# 4. 购买前先确认价格
curl -s 'https://otpdrop.com/api/v1/quote?service=telegram&country=us'

# 5. 购买 —— 余额被扣除,号码立即交付
ORDER=$(curl -s -X POST https://otpdrop.com/api/v1/orders \
  -H "Authorization: Bearer \$SEED" \
  -H 'content-type: application/json' \
  -d '{"service": "telegram", "country": "us"}' | jq -r .order_id)

# 6. 轮询验证码
until curl -s https://otpdrop.com/api/v1/orders/\$ORDER/sms \
  -H "Authorization: Bearer \$SEED" | jq -e .code; do sleep 4; done

同样的流程用 Python 实现,不需要 shell:

import time, requests

API = "https://otpdrop.com/api/v1"
seed = requests.post(f"{API}/accounts").json()["seed"]
auth = {"Authorization": f"Bearer {seed}"}

topup = requests.post(f"{API}/topups", headers=auth,
                      json={"amount_usd": 25, "coin": "USDT"}).json()
print("send", topup["coin_amount"], topup["coin"], "to", topup["address"])

while requests.get(f"{API}/topups/{topup['topup_id']}",
                   headers=auth).json()["status"] != "credited":
    time.sleep(15)

order = requests.post(f"{API}/orders", headers=auth,
                      json={"service": "telegram", "country": "us"}).json()
print("number:", order["phone"])

while True:
    sms = requests.get(f"{API}/orders/{order['order_id']}/sms",
                       headers=auth).json()
    if sms["arrived"]:
        print("code:", sms["code"])
        break
    time.sleep(4)

MCP 服务器

同样的操作也通过 Model Context Protocol 在 https://otpdrop.com/mcp 上提供,共十一个工具。 要把它加入 Claude Code:

claude mcp add --transport http otpdrop https://otpdrop.com/mcp

配置方法和完整的工具清单见面向智能体的页面。

发现文件

机器可读的服务描述,全部无需认证即可获取。

文件内容
/openapi.json完整的 OpenAPI 3.1 架构
/.well-known/agent.json能力、认证模型和运行规则
/llms.txt给语言模型的简短指引
/llms-full.txt同上,另含完整目录

常见问题

OTPDrop 的 API 需要密钥吗?

不需要。没有什么要申请,也没有审核。凭证就是账户的助记词,作为 bearer 令牌传递 —— 而目录类接口连这个都不需要。

OTPDrop 的 API 收费吗?

除了号码本身之外不收费。没有订阅,没有按调用计费,也没有最低用量 —— 价格与网站上一致。

这个 API 支持哪些编程语言?

任何能发起 HTTPS 请求的语言。它就是 HTTP 上的普通 JSON 加一个 bearer 请求头:不用安装 SDK,也不用跟着我们的版本升级。

如果短信没来会怎样?

订单到期时会自行把钱退回余额;您也可以在网站上提前取消。您为送达的验证码付费,而不是为尝试付费。

REST API 和 MCP 服务器是同一套东西吗?

是的,而且是有意为之。每个 REST 接口都是某个 MCP 工具调用的映射,因此它们不可能出现分歧:改动一边就是改动另一边。选择更适合您客户端的那一种。

能不花钱测试这个 API 吗?

目录、算价和创建账户都是免费的:因此集成的绝大部分都可以在充值之前写好并验证。只有购买才会花钱。