说明 |
---|
通过 createTask方法 创建识别任务,然后通过 getTaskResult 方法 获取识别结果To create a recognition task using the |
信息 |
---|
与 reCaptcha V2 不同在于,V3是无感识别,V3需要增加 |
创建任务
通过 createTask方法 创建识别任务
...
In contrast to reCaptcha V2, reCaptcha V3 is a non-intrusive verification method that requires an additional |
Create Tasks
To create a recognition task using the createTask
method.
Request node:
状态 | ||||
---|---|---|---|---|
|
https://api.yescaptcha.com
状态 | ||||
---|---|---|---|---|
|
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 | RecaptchaV3TaskProxyless
RecaptchaV3TaskProxylessM1
RecaptchaV3TaskProxylessM1S7
RecaptchaV3TaskProxylessT1
*If the above types cannot pass the verification for your website, you can contact customer service to customize an API for you. | ||||||||||||||||||||||||
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? | ||||||||||||||||||||||||
pageAction | String | 否 | 此值必须正确,否则识别的结果无效。🔗 如何找到pageAction值 |
...
No | This value must be correct, otherwise the recognition result is invalid.🔗How to find the necessary parameters for Google reCaptcha |
Request Example
代码块 | ||
---|---|---|
| ||
{ "clientKey": "cc9c18d3e263515c2c072b36a7125eecc078618f", "task": { "websiteURL" : "https://www.toysrus.co.jp/member/CMmMemberForm.jsp", "websiteKey" : "6LdJXmobAAAAAFLNEpWqZrAXDr4I3l2lFyMLdqoM", "pageAction" : "homepage", // not 非必填required "type" : "RecaptchaV3TaskProxyless" } } |
...
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:
状态 | ||||
---|---|---|---|---|
|
https://api.yescaptcha.com
状态 | ||||
---|---|---|---|---|
|
https://chinacn.yescaptcha.com
请求地址: Request address: https://api.yescaptcha.com/getTaskResult
请求格式:Request format:POST
application/json
根据系统负载,您将在 10s 到 80s 的时间间隔内得到结果
...
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. |
solution | Object识别结果,不同类型的任务结果会有所区别。 | Task result data. Different for each type of task. |
gRecaptchaResponse | string | 识别结果:response值,用于POST或模拟提交给目标网站。 一次性使用,有效期120s,建议在60s内使用。🔗 了解如何使用response通过验证 |
...
Recognition result: The The |
Response Example
代码块 | ||
---|---|---|
| ||
{ "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
了解出错误信息 🔗 全部错误说明
拓展:
reCaptcha其他type可选(使用以下type不需要另外指定minScore):Response Description
Recognition succeeded: If
errorId
= 0 andstatus
isready
, the result is in thesolution
field.Recognition in progress: If
errorId
= 0 andstatus
isprocessing
, please retry after 3 seconds.Error occurred: If
errorId
> 0, please refer toerrorDescription
to learn more about the error message. 🔗 Error Types
...
Expansion:
Other optional types for reCaptcha include:(No need to specify minScore for the following types of reCaptcha)
RecaptchaV3TaskProxylessM1S7
状态 | ||||
---|---|---|---|---|
|
RecaptchaV3TaskProxylessM1S9
状态 | ||||
---|---|---|---|---|
|
常见问题:FAQ:
展开 | ||||
---|---|---|---|---|
|
| |||
|