📖 API 对接文档

← 首页

账号领取 API

极验验证通过 → 返回账号密码 + 库存数量

0整体流程(先看懂再对接)

用户 在你页面点击「领取」
前端JS 加载极验SDK,弹出验证码
极验 用户滑完拼图,返回 4 个参数
前端JS 把 4 个参数 POST 到你的后端
你的后端 收到参数,转发给我的 API
我的API 调极验二次校验 → 通过则返回账号
你的后端 收到账号,返回给前端展示
极验参数只能在前端 JS 获取,后端拿不到。所以你需要前端 + 后端配合。

1我给你什么

API 地址https://get.fzyidc.com/api.php
captcha_idd6545edb20e9d3af0ba00c7549cd27c6

2你要做的事

第一步:你的前端页面 — 加载极验,拿到参数

你的前端页面 (HTML)
<!-- 在你的页面引入极验 SDK -->
<script src="https://static.geetest.com/v4/gt4.js"></script>

<button id="claimBtn" onclick="doClaim()">领取账号</button>

<script>
var CAPTCHA_ID = 'd6545edb20e9d3af0ba00c7549cd27c6';
var gtObj = null;

// 初始化极验
initGeetest4({
    captchaId: CAPTCHA_ID,
    product: 'bindbindbindbind'  // 验证码直接弹出
}, function(obj) {
    gtObj = obj;
    obj.onSuccess(function() {
        // 拿到极验返回的 4 个参数
        var r = obj.getValidate();
        var params = {
            lot_number:     r.lot_number,
            captcha_output: r.captcha_output,
            pass_token:     r.pass_token,
            gen_time:       r.gen_time
        };

        // 发给你的后端
        fetch('/your-api', {
            method: 'POST',
            headers: { 'Content-Type': 'application/json' },
            body: JSON.stringify(params)
        })
        .then(function(res) { return res.json(); })
        .then(function(data) {
            if (data.success) {
                alert('账号: ' + data.username + '\n密码: ' + data.password);
            } else {
                alert(data.message);
            }
        });
    });
});

function doClaim() {
    if (gtObj) gtObj.showCaptcha();
}
</script>

第二步:你的后端 — 收到参数后转发给我

你的后端 — Python
import requests
from flask import Flask, request, jsonify

app = Flask(__name__)

MY_API = 'https://get.fzyidc.com/api.php'

@app.route('/your-api', methods=['POST'])
def claim():
    data = request.get_json()

    # 把前端拿到的极验参数转发给我的 API
    resp = requests.post(MY_API, data={
        'lot_number':     data['lot_number'],
        'captcha_output': data['captcha_output'],
        'pass_token':     data['pass_token'],
        'gen_time':       data['gen_time'],
    })

    return jsonify(resp.json())
你的后端 — PHP
<?php
$data = json_decode(file_get_contents('php://input'), true);

// 转发给我的 API
$ch = curl_init('https://get.fzyidc.com/api.php');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
    'lot_number'     => $data['lot_number'],
    'captcha_output' => $data['captcha_output'],
    'pass_token'     => $data['pass_token'],
    'gen_time'       => $data['gen_time'],
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
curl_close($ch);

header('Content-Type: application/json');
echo $result;
你的后端 — Node.js
const express = require('express');
const axios = require('axios');
const app = express();

app.use(express.json());

app.post('/your-api', async (req, res) => {
    const { lot_number, captcha_output, pass_token, gen_time } = req.body;

    const resp = await axios.post('https://get.fzyidc.com/api.php',
        new URLSearchParams({ lot_number, captcha_output, pass_token, gen_time })
    );

    res.json(resp.data);
});

3请求参数(前端拿到后原样转发)

参数来源说明
lot_number*极验自动验证流水号
captcha_output*极验自动验证输出
pass_token*极验自动通过标识
gen_time*极验自动时间戳
这 4 个参数由极验 SDK 自动生成,你不需要手动构造,前端拿到后原样传给后端,后端原样转发给我就行。

4返回结果

✅ 成功
"success": true
"username": "xxx"
"password": "xxx"
"total": 3028
"remaining": 2078
❌ 失败
"success": false
"message": "原因"

5常见问题

Q: 极验参数从哪拿?
前端 JS 调极验 SDK,用户滑完验证码后,调 obj.getValidate() 就能拿到 4 个参数
Q: 后端能直接拿极验参数吗?
不能。极验参数只能在前端 JS 获取,后端需要前端传过来
Q: 我需要自己调极验接口吗?
不需要。你把参数转给我,我这边做二次校验
Q: 有频率限制吗?
每人每天最多 4 次
Q: "验证失败"?
极验参数过期或无效,让用户重新滑一次验证码