Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Create a task through the createTask method, and then get the result through the getTaskResult method

Create Task

Create a task through the createTask method

Request host: https://api.ez-captcha.com

Request api: https://api.ez-captcha.com/createTask

Request format:POST application/json

Parameter Structure

Parameter

Type

Required

Description

clientKey

string

yes

Your client key

type

string

yes

CloudFlare5STask

websiteURL

string

yes

website url, usually a fixed value.

proxy

string

yes

The proxy you used to access the website

Request Example

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

Content-Type: application/json

{
    "clientKey": "cc9c18d3e263515c2c072b36a7125eecc078618f",
    "task": {
        "websiteURL": "https://xxx.com",
        "type": "CloudFlare5STask",
        "proxy": "http://username:password@ip:port",
    }
}

Reponse Example

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

Get Result

Use the getTaskResult method to get the recognition result

Request host: https://api.ez-captcha.com

Request api: https://api.ez-captcha.com/getTaskResult

Request format:POST application/json

Depending on system health, you will get results in 10s to 80s interval with 120s timeout

Request Example

POST https://api.ez-captcha.com/getTaskResult

Content-Type: application/json
 
{
    "clientKey":"YOUR_API_KEY",
    "taskId": "TASKID OF CREATETASK" //ID created by createTask method
}

Response Data

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

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

Response Description

  • Successful recognition: when errorId is equal to 0 and status is equal to ready, the result is in the solution.

  • Identifying: When errorId is 0 and status is processing, please try again after 3 seconds.

  • An error occurred: when the errorId is greater than 0, please understand the error information according to the errorDescription All error descriptions

  • No labels