版本比较

密钥

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。
说明

通过 createTask方法 创建识别任务,然后通过 getTaskResult 方法 获取识别结果

信息

此对象用于识别reCaptchaV2版本

创建任务

通过 createTask方法 创建识别任务

...

To create a recognition task using the createTask method and obtain the recognition result using the getTaskResult method.

信息

This object is used for recognizing reCaptchaV2 versions.

Create Tasks

To create a recognition task using the createTask method.

Request node:

状态
colourGreen
title国际节点INTERNATIONAL NODE
https://api.yescaptcha.com
状态
colourGreen
title国内节点CHINA NODE
https://cn.yescaptcha.com

请求地址: Method address:: https://api.yescaptcha.com/createTask

请求格式:Request format:POST application/json

...

Example Structure

属性Parameters

类型Type

必须Required

说明Purpose

type

string

Yes

NoCaptchaTaskProxyless

状态
colourGreen
title15 POINTS
状态
colourYellow
title插件默认default

RecaptchaV2TaskProxyless

状态
title20 18 POINTS
->
状态
colourGreen
title18 POINTS20 POINTS
状态
colourYellow
titleHigher quality
状态
colourYellow
title质量更好,更稳定。more stable

websiteURL

string

Yes

ReCaptcha 网页地址,一般固定值。🔗 如何找到websiteURL值The address of the ReCaptcha web page.Fixed value.🔗 How to find the value of websiteURL?

websiteKey

String

Yes

ReCaptcha 网站密钥,固定值。🔗 如何找到websiteKey值The ReCaptcha website key. Fixed value.🔗 How to find the value of websiteKey?

isInvisible

Bool

遇到isInvisible类型的reCaptchaV2需要添加此参数 🔗 如何判断 reCaptcha 是什么版本

...

No

If you encounter a reCaptchaV2 of isInvisible type, you need to add this parameter. 🔗 How to determine the version of reCaptcha?

Request Example

代码块
languagejson
{
    "clientKey": "cc9c18d3e263515c2c072b36a7125eecc078618f",
    "task": {
        "websiteURL": "https://www.google.com/recaptcha/api2/demo",
        "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
        "type": "NoCaptchaTaskProxyless",
        "isInvisible": false // isinvisable类型才需要添加 true 值You only need to add the true value if the reCaptcha type is isInvisible.
    }
}

...

Response Example

代码块
{
    "errorId": 0,
    "errorCode": "",
    "errorDescription": "",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" // 请记录此ID Please keep a record of this ID.
}

获取结果

使用 getTaskResult 方法获取识别结果

...

Get the Result

To obtain the recognition result using the getTaskResult method.

Request node:

状态
colourGreen
title国际节点INTERNATIONAL NODE
https://api.yescaptcha.com
状态
colourGreen
title国内节点CHINA NODE
https://chinacn.yescaptcha.com

请求地址: Request address: https://api.yescaptcha.com/getTaskResult

请求格式:Request format:POST application/json

根据系统负载,您将在 10s 到 80s 的时间间隔内得到结果,120秒超时

...

Based on the system load, you will receive the result within a time interval of 10s to 80s, with a timeout of 120 seconds.

Request Example

代码块
{
    "clientKey":"cc9c18d3e263515c2c072b36a7125eecc078618f3",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

...

Response Result

参数Parameters

类型Type

说明Purpose

errorId

Integer

错误提示: Error message: 0 - 没有错误,1 - 有错误No error, 1 - Error

errorCode

string错误代码,🔗 点这里查看全部错误列表

Error code.Check out🔗 errors list.

errorDescription

string错误详细描述

Error description

status

String

processing - 正在识别中,请3秒后重试task is not ready yet.
ready - 识别完成,在solution参数中找到结果task complete, solution object can be found in solution property.

solution

Object识别结果,不同类型的任务结果会有所区别。

Task result data. Different for each type of task.

gRecaptchaResponse

string

识别结果:response值,用于POST或模拟提交给目标网站。

一次性使用,有效期120s,建议在60s内使用。🔗 了解如何使用response通过验证

...

Recognition result: The response value, which is used to make a POST or simulated submission to the target website.

The response value is for one-time use only and is valid for 120 seconds. We recommend using it within 60 seconds.🔗 How to pass Google reCaptcha using the API

Response Example

代码块
languagejson
{
    "errorId": 0,
    "errorCode": null,
    "errorDescription": null,
    "solution": {
        "gRecaptchaResponse": "03AGdBq25SxXT-pmSeBXjzScW-EiocHwwpwqtk1QXlJnGnU......"
    },
    "status": "ready"
}

响应说明

  • 识别成功:当errorId等于0 并且status等于 ready,结果在solution里面。

  • 正在识别中:当errorId等于0 并且status等于 processing,请3秒后重试。

  • 出错了:当errorId 大于0,请根据errorDescription了解出错误信息 🔗 全部错误说明

常见问题:

...

title我想问一下 这个验证返回的结果我提交有的是成功有的是失败是什么情况?

...

接口返回的结果不是100%都能验证成功,根据网站不同通过概率不同。

...

对方网站会设置一个分数要求,低于分数的就无法验证成功

...

对方网站会随时调高或降低分数

...

如果你的网站有一点概率通过,就说明已经很不错了。

...

Response Description

  • Recognition succeeded: If errorId = 0 and status is ready, the result is in the solution field.

  • Recognition in progress: If errorId = 0 and status is processing, please retry after 3 seconds.

  • Error occurred: If errorId > 0, please refer to errorDescription to learn more about the error message. 🔗 Error Types

FAQ:

展开
titleI would like to ask why sometimes the reCaptcha verification result I submit is successful, while other times it is not. What could be the reason for this?
  1. The result returned by the API may not be 100% successful in verification, and the success rate may vary depending on the website.

  2. The target website sets a score requirement, and those with a score lower than the requirement cannot pass the verification.

  3. The target website may adjust the score requirement at any time.

  4. If your website has some probability of passing, then it's already quite good.

  5. For V2, you can use image recognition API or paid plugins based on the image recognition API to achieve 100% success after clicking on the images.