无法用于谷歌验证,只能接OpenAI,使用前请甄别!

Codex 接码助手

号码库存状态

短效号码 --
长效号码 --

近期接码状态

最近24小时

成功 失败
正在加载近期数据

API 文档

快速开始

  1. 1. POST /api/v1/code/request 启动会话
  2. 2. 触发发送验证码到返回的手机号
  3. 3. GET /api/v1/code/[sessionId] 轮询结果(每 3 秒)
  4. 4. POST /api/v1/code/[sessionId]/switch 换号(可选)

API 端点

POST /api/v1/code/request

启动接码会话。一次性 CDK 和长期 CDK 都能使用 /api/v1/code/*

请求

{
  "cdk": "your-cdk-code"
}

响应

{
  "sessionId": "uuid",
  "phone": "+1234567890",
  "expiresAt": "2026-07-09T12:34:56.789Z",
  "state": "polling",
  "attempt": 1,
  "maxAttempts": 6,
  "switchCount": 0,
  "maxSwitches": 5,
  "remainingSwitches": 5,
  "recordUrl": "https://sms.example.com/record/...", // 一次性 CDK:当前 attempt 的记录链接
  "recordLine": "line-name" // 一次性 CDK:当前 attempt 的记录行
}

一次性 CDK 响应中存在的 recordUrlrecordLine 仅对应当前 attempt;换号后请使用新响应中的字段。

调用频率:每个 IP 每 60 秒最多发起 30 次请求。超过限制时返回 HTTP 429:{"success":false,"error":"Too many requests"}。

GET /api/v1/code/[sessionId]

查询验证码状态

响应

{
  "state": "polling | succeeded | failed | expired",
  "phone": "+1234567890",
  "remainingTime": 85,
  "code": "123456", // 仅在 succeeded 时存在
  "error": "timeout | max_retries | expired", // 仅在 failed 时存在
  "attempt": 1,
  "maxAttempts": 6,
  "switchCount": 0,
  "maxSwitches": 5,
  "remainingSwitches": 5
}

建议每 3 秒轮询一次,最多 90 秒

POST /api/v1/code/[sessionId]/switch

换号重试

响应

{
  "phone": "+0987654321",
  "sessionId": "same-uuid",
  "attempt": 2,
  "maxAttempts": 6,
  "switchCount": 1,
  "maxSwitches": 5,
  "remainingSwitches": 4,
  "recordUrl": "https://sms.example.com/record/...", // 一次性 CDK:新当前 attempt 的记录链接
  "recordLine": "line-name" // 一次性 CDK:新当前 attempt 的记录行
}

一次性 CDK 换号后返回的 recordUrlrecordLine 对应新的当前 attempt,旧 attempt 的链接不可继续使用。

长期 CDK 成功接码后号码锁定,不能再换号。

POST /api/cdk/redeem/batch

批量兑换长期和一次性 CDK。成功项通过 type 区分契约。

请求

{
  "cdks": ["your-bindable-cdk", "your-onetime-cdk"]
}

每批最多 100 项。

HTTP 200 响应

{
  "items": [
    {
      "index": 0,
      "status": "success",
      "type": "bindable",
      "phone": "+1234567890",
      "url": "https://sms.example.com/access/...",
      "line": "line-name",
      "expireTime": "2026-07-09T12:34:56.789Z",
      "bindingVersion": 1
    },
    {
      "index": 1,
      "status": "success",
      "type": "onetime",
      "sessionId": "uuid",
      "phone": "+0987654321",
      "recordUrl": "https://sms.example.com/record/...",
      "recordLine": "line-name",
      "attempt": 1,
      "maxAttempts": 6,
      "switchCount": 0,
      "maxSwitches": 5,
      "remainingSwitches": 5
    },
    {
      "index": 2,
      "status": "error",
      "error": "invalid cdk"
    }
  ]
}

一次性成功项的 recordUrlrecordLine 仅对应其当前 attempt;后续换号只能调用 /api/v1/code/[sessionId]/switch。长期成功项使用 bindingVersion,后续换号仍调用 /api/cdk/redeem/switch

curl 示例

curl -X POST "https://sms.example.com/api/cdk/redeem/batch" \
  -H "Content-Type: application/json" \
  -d '{"cdks":["your-cdk-code"]}'

每个 IP 每 60 秒最多发起 30 个批量 HTTP 请求,超限返回 HTTP 429:{"success":false,"error":"Too many requests"}。这是请求数限制,不是每批仅限 30 个 CDK。

Python 示例

完整代码:examples/python_client.py

from python_client import CodexSmsClient

client = CodexSmsClient(
    base_url="https://sms.example.com",
    cdk="your-cdk-code"
)

session = client.request_code()
print(f"Phone: {session['phone']}")

# 触发 OpenAI 发送验证码...

code = client.wait_for_code(timeout=90, poll_interval=3)
print(f"Code: {code}")