← 返回控制台

开发者 API 接口文档

对接您的自动化程序,实现账号批量提交流水线

📡 接口基本信息

接口基准地址:加载中...
请求方式:POST 所有 API 强制 POST
数据格式:application/json
鉴权方式:所有请求必须在 body 中携带 cdkey 字段(即您的卡密 code)作为唯一身份与计费凭证
频率限制:60 次 / 分钟 / cdkey
统一返回:JSON 对象,含 success 字段;失败时附 error 描述
扣点规则:只在「验证成功」时扣点。失败、取消、未跑均不扣点。token_only 模式与 /api/v1/refill_token 接口永不扣点

目录

  1. 查询卡密余额
  2. 提交账号到队列
  3. 查询任务状态
  4. 取消排队任务
  5. 删除任务
  6. 重试失败任务
  7. 补 Token (不扣费)
  8. 导出成功结果
  9. 导出失败结果
1.
查询卡密余额
POST /api/v1/balance

在批量提交前,可调用此接口确认卡密剩余可用次数。

参数名类型必填说明
cdkeyString您的授权卡密

返回示例

{
  "success": true,
  "remaining_uses": 450,
  "used": 12,
  "total": 462
}
2.
提交账号到队列
POST /api/v1/submit

向调度中心提交一个或多个账号加入等待队列。worker 会自动拉取并执行。提交不扣点,只在执行成功后才扣点。

参数名类型必填说明
cdkeyString您的授权卡密
accountsArray否*账号数组(批量),每项含 email/password/totp/recovery_email
emailString否*单条提交模式,谷歌账号邮箱
passwordString否*账号密码(单条模式)
totpString2FA 密钥(无空格),单条模式。也可叫 twofa
recovery_emailString辅助邮箱(用于跳过辅助邮箱验证)
modeString处理模式:full(默认,完整流程含取 token,扣费) / bind_only(只登录+绑号,不取 token,扣费) / token_only(只取 token 不过设备,不扣费)。非法值会回落到 full
* accounts 与单条字段 email/password 二选一。批量优先级更高。

请求示例(批量)

{
  "cdkey": "K-YOURCDKEY",
  "accounts": [
    {"email":"a@gmail.com", "password":"Pwd1", "totp":"JBSWY3DPEHPK3PXP"},
    {"email":"b@gmail.com", "password":"Pwd2", "totp":"AAAA"}
  ]
}

返回示例

{
  "success": true,
  "submitted": 2,
  "tasks": [
    {"task_id": 1024, "email": "a@gmail.com", "status": "queued"},
    {"task_id": 1025, "email": "b@gmail.com", "status": "queued"}
  ],
  "mode": "full",
  "remaining_uses": 450
}
3.
查询任务状态
POST /api/v1/status

支持按 task_id、task_ids 批量、email、或 filter 状态过滤查询。

参数名类型必填说明
cdkeyString您的授权卡密
task_idInt单条任务 ID
task_idsArray多个任务 ID 批量查询
emailString按邮箱查询(同卡密下)
filterString按状态过滤:queued / running / success / failed / no_quota。不传则返回全部
include_tokenBool是否在 success 任务中返回 token,默认 false

返回示例

{
  "success": true,
  "count": 1,
  "data": [{
    "task_id": 1024,
    "email": "a@gmail.com",
    "status": "success",
    "message": "验证通过",
    "completed_at": 1734567890,
    "used_phone": "",
    "mode": "bind_only",
    "has_token": false,
    "refilling": false
  }]
}
状态枚举:queued 排队中 / running 执行中 / success 成功 / failed 失败 / no_quota 卡密无余额
新字段:mode 任务模式 (full/bind_only/token_only) / has_token 该任务是否已有 token / refilling 是否正在补 token (token_only 重排队中)。
注意:当 bind_only 成功的任务调用 /api/v1/refill_token 后,status 对外仍显示 success(避免代理客户看到状态回退),但 refilling=true 表示后台正在补 token。补完后 has_token 变 true 且 refilling 变 false。
4.
取消排队任务
POST /api/v1/cancel

取消还在 queued 状态的任务(已经分配给 worker 执行中的任务无法取消)。

参数名类型必填说明
cdkeyString您的授权卡密
task_idInt任务 ID

返回示例

{"success":true, "cancelled":1, "message":"任务已取消"}
5.
删除任务
POST /api/v1/delete

删除任意状态的任务记录(不退点 — 因为成功才扣点)。

参数名类型必填说明
cdkeyString您的授权卡密
task_idInt否*单个任务 ID
task_idsArray否*批量任务 ID。* 二选一

返回示例

{"success":true, "affected":3}
6.
重试失败任务
POST /api/v1/retry

把 failed 状态的任务重新放回 queued 队列,worker 会再次执行。

参数名类型必填说明
cdkeyString您的授权卡密
task_idInt否*单个任务 ID
task_idsArray否*批量任务 ID
all_failedBool否*true = 重试所有 failed 任务。* 三选一

返回示例

{"success":true, "affected":5}
7.
补 Token (不扣费)
POST /api/v1/refill_token

对已成功但 token 为空(典型场景:bind_only 模式跑完的任务)的账号补抽 token。本次重排不扣点,失败也不扣点。任务以 token_only 模式重新进入队列,worker 抓到后只跑 token 抽取流程,不重做设备验证/绑号。

参数名类型必填说明
cdkeyString您的授权卡密
task_idInt否*单个任务 ID
task_idsArray否*批量任务 ID 数组(最多 5000)。* 二选一

请求示例

{
  "cdkey": "K-YOURCDKEY",
  "task_ids": [1024, 1025, 1026]
}

返回示例

{
  "success": true,
  "requeued": 2,
  "skipped": 1
}
requeued:实际重新排队的数量。
skipped:未处理的数量(原因:task_id 不存在 / 不属于本卡密 / 状态不是 success / 该任务已经有 token / 已经在重排中)。
查询补 Token 进度:/api/v1/status?task_id=X 查询,status 保持 successrefilling=true 表示进行中。完成后 has_token 变 true、refilling 变 false。
典型用法:bind_only + refill_token 组合
1. 用 mode=bind_only 批量提交:只跑设备验证+绑号,扣 1 点/账号
2. 跑完后,对需要 token 的账号调用本接口补抽:不再扣费
等于"先无 token 拿到一批已绑号成功的号,后续按需补 token"。
8.
导出成功结果
POST /api/v1/export

一次性拿走所有 success 任务的 token 与账号信息。可选导出后清库。

参数名类型必填说明
cdkeyString您的授权卡密
clearBooltrue = 导出后清空成功记录(同前端 UI 行为)。默认 false
with_tokenBool是否包含 token,默认 true

返回示例

{
  "success": true,
  "count": 38,
  "tokens": ["1//xxx", "1//yyy"],
  "data": [{"email":"a@gmail.com", "password":"Pwd1", "token":"1//xxx", "used_phone":""}],
  "lines": "a@gmail.com----Pwd1----1//xxx\nb@gmail.com----Pwd2----1//yyy"
}
9.
导出失败结果
POST /api/v1/export_failed

一次性拿走所有 failed 任务的完整数据 + 失败原因 + 已用号码。可选导出后清库。便于下游分析重试。

参数名类型必填说明
cdkeyString您的授权卡密
clearBooltrue = 导出后仅清本次返回的 task_ids (不会误删别人的)。默认 false
task_idsArray<Int>只导这几个任务 (过滤只返 failed)
client_refString只导某个下游客户标
delimiterString行内分隔符, 默认 ----
formatStringjson (默认) 或 text (仅返 lines, 体积小)

返回示例

{
  "success": true,
  "count": 5,
  "data": [{
    "task_id": 123,
    "email": "a@gmail.com",
    "password": "Pwd1",
    "recovery": "",
    "totp": "JBSWY3DPEHPK3PXP",
    "used_phone": "+8613xxx",
    "result_msg": "密码错误:密码可能已被修改",
    "client_ref": "",
    "completed_at": 1750000000
  }],
  "lines": "a@gmail.com----Pwd1----JBSWY3DPEHPK3PXP----+8613xxx----密码错误:密码可能已被修改"
}

行格式:邮箱{D}密码{D}[辅助邮箱]{D}[2FA]{D}[已用号码]{D}失败原因{D} 默认为 ----。失败原因总在最后一列。

💻
多语言调用示例(以提交任务为例)
import requests

url = "加载中"
payload = {
    "cdkey": "K-YOURCDKEY",
    "accounts": [
        {"email": "a@gmail.com", "password": "Pwd1", "totp": "JBSWY3DPEHPK3PXP"},
    ]
}
r = requests.post(url, json=payload, timeout=30)
print(r.json())
curl -X POST 加载中 \
  -H "Content-Type: application/json" \
  -d '{"cdkey":"K-YOURCDKEY","accounts":[{"email":"a@gmail.com","password":"Pwd1","totp":"JBSWY3DPEHPK3PXP"}]}'
<?php
$url = "加载中";
$data = [
    "cdkey" => "K-YOURCDKEY",
    "accounts" => [
        ["email" => "a@gmail.com", "password" => "Pwd1", "totp" => "JBSWY3DPEHPK3PXP"]
    ]
];
$opts = ["http" => [
    "method" => "POST",
    "header" => "Content-Type: application/json",
    "content" => json_encode($data)
]];
echo file_get_contents($url, false, stream_context_create($opts));
?>
const res = await fetch("加载中", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    cdkey: "K-YOURCDKEY",
    accounts: [{ email: "a@gmail.com", password: "Pwd1", totp: "JBSWY3DPEHPK3PXP" }]
  })
});
console.log(await res.json());