TurnstileTaskProxyless: Cloudflare Turnstile protocol interface
Use the createTask
method to create a recognition task, and then use the getTaskResult
method to retrieve the recognition result.
Create Task
Create a recognition task using the createTask method.
Request Nodes:
Request URL:
https://api.yescaptcha.com/createTask
Request Format:
POST application/json
Object Structure:
Property | Type | Required | Description |
---|---|---|---|
type | string | True | TurnstileTaskProxyless 15 points TurnstileTaskProxylessM1 30 points |
websiteURL | string | True | Web Address: Generally a fixed value. |
websiteKey | String | True | Site Key: Generally a fixed value. |
Request Example
{
"clientKey":"cc9c18d3e263515c2c072b36a7125eecc078618f",
"task":
{
"type":"TurnstileTaskProxyless",
"websiteURL":"https://react-turnstile.vercel.app",
"websiteKey":"1x00000000000000000000AA"
}
}
Response Example
{
"errorId": 0,
"errorCode": "",
"errorDescription": "",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" // Please record this ID.
}
Get Result
Use the getTaskResult
method to obtain the recognition result.
Request Nodes:
Request URL:https://api.yescaptcha.com/getTaskResult
Request Format:POST application/json
Depending on the system load, you will receive the result within a time interval of 10 to 80 seconds.
Request Example
{
"clientKey":"cc9c18d3e263515c2c072b36a7125eecc078618f3",
"taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}
Response Result
Property | Type | Description |
---|---|---|
errorId | Integer | Error Message:0 - No error,1 - Error occurred. |
errorCode | string | Error Code |
errorDescription | string | Error Detailed Description |
status | String | processing - Recognition in progress, please try again in 3 seconds. |
solution | Object | Identification results, different types of task results will be different. |
gRecaptchaResponse | string | Identification result: response value. One-time use, valid for 120 seconds, recommended to use within 60 seconds. |
Request Example
Response Description
Successful identification: When errorId is equal to 0 and status is equal to ready, the result is in solution.
Identifying: When errorId is equal to 0 and status is equal to processing, please try again after 3 seconds.
Error: When errorId is greater than 0, please understand the error information according to errorDescription All error descriptions