Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Parameter

Type

Required

Description

clientKey

string

yes

Your client key

type

string

yes

CloudFlareTurnstileTask

websiteURL

string

yes

website url, usually a fixed value.

websiteKey

string

yes

website key, usually a fixed value.

rqData

Object

optional

Turnstile extra data (Document)

rqData.mode

string

optional

The value of the data-action attribute of the Turnstile element if it exists.

rqData.metadataAction

string

optional

The value of the data-action attribute of the Turnstile element if it exists.

rqData.metadataCdata

string

optional

The value of the data-action attribute of the Turnstile element if it exists.

Request Example

Code Block
POST https://api.ez-captcha.com/createTask

Content-Type: application/json

{
    "clientKey": "cc9c18d3e263515c2c072b36a7125eecc078618fYourClientKey",
    "task": {
        "websiteURL": "https://xxx.com",
        "type": "CloudFlareTurnstileTask",
        "websiteKey": "xxxx",
        "rqData":{                     //optional
            "mode":"flexible",
            "metadataAction":"signup",
            "metadataCdata":""
        },
    }
}

Reponse Example

Code Block
{
    "errorId": 0,
    "errorCode": "",
    "errorDescription": "",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006" // Please save this ID for next step
}

...

Parameter

Type

Description

errorId

Integer

Error message: 0 - no error, 1 - error

errorCode

string

Error code, click here to view all error list

errorDescription

string

Detailed error description

status

String

processing - task is in progress, please try again in 3 seconds

ready - task is complete, find the result in the solution parameter

solution

Object

The recognition result will be different for different types of captcha. For reCaptcha, the result is gRecaptchaResponse in the object.

solution.gRecaptchaResponse

string

Recognition result: response value, used for POST or simulated submission to the target website.

The validity period is generally 120s, it is recommended to use within 60s

Response Example

Code Block
{
    "errorId": 0,
    "errorCode": null,
    "errorDescription": null,
    "solution": {
        "gRecaptchaResponse{"header": {}, "token": "0...alU6fkxnt1TwF7lTlYWWdu0o80HW-4unnp..."}
    },
    "status": "ready"
}

Response Description

...