API 对接流程

极验验证 → 二次校验 → 返回账号

对接方前端
用户
01
点击「领取」按钮
用户在对接方的页面上操作
前端JS
02
加载极验 SDK
用 captcha_id 初始化,弹出验证码
initGeetest4({ captchaId: 'd6545edb20e9d3af0ba00c7549cd27c6' })
用户
03
滑动验证码
完成拼图验证
极验
04
返回 4 个参数
极验 SDK 自动生成,前端 JS 获取
lot_number / captcha_output / pass_token / gen_time
对接方后端转发
前端JS
05
POST 到对接方后端
前端把 4 个参数发给自己后端
fetch('/your-api', { method: 'POST', body: JSON.stringify(params) })
对接方后端
06
转发给我的 API
原样转发 4 个极验参数
POST https://get.fzyidc.com/api.php
我的 API 处理
我的API
07
极验二次校验
用 captcha_key 生成签名,调极验接口验证
sign_token = hmac_sha256(lot_number, captcha_key)
POST gcaptcha4.geetest.com/validate
极验
08
返回校验结果
result: "success" → 有效
result: "fail" → 无效或过期
我的API
09
返回账号 + 库存
校验通过 → 从数据库取账号返回
{"success":true,"username":"***","password":"***","total":3028,"remaining":2078}
✅ 成功
"success": true
"username": "***"
"password": "***"
"total": 3028
"remaining": 2078
❌ 失败
"success": false
"message": "原因"

说明

极验参数只能在前端 JS获取,后端拿不到
对接方需要前端 + 后端配合
对接方后端只做转发,不需要调极验接口
接口:POST https://get.fzyidc.com/api.php
文档:https://get.fzyidc.com/docs.php