Versions Compared

Key

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

Description

This method creates a task for solving selected captcha type. In the parameters you need to pass the client authorization data, typed task data and other optional parameters.

Method address: https://api.capmonster.cloud/createTask
Request format: JSON POST

...

Request parameters

...

Parameter

Type

Required

Purpose

clientKey

String

Yes

Client

account

API key

, can be found here

. You can get it here.

task

Task type object

Yes

Task data. See list of available object descriptions here.

callbackUrl

String

No

Optional web address where we will send result of captcha task processing. Contents are sent by POST request and are same to the contents of getTaskResult method. The content of the response is not checked and you must accept the request in 2 seconds then the connection will be closed.

Request examples

Expand
titleSolving the usual captcha with the image
Code Block
languagejson
{
    "clientKey":"67b6bcbb1a728ea8d563de6d169a2057",
    "task":
        {
            "type":"ImageToTextTask",
            "body":"BASE64_BODY_HERE!"
        }
}
Expand
titleSolving ReCaptcha2
Code Block
languagejson
{
    "clientKey":"67b6bcbb1a728ea8d563de6d169a2057",
    "task":
        {
            "type":"NoCaptchaTaskProxyless",
            "websiteURL":"https://lessons.zennolab.com/captchas/recaptcha/v2_simple.php?level=high",
            "websiteKey":"6Lcg7CMUAAAAANphynKgn9YAgA4tQ2KI_iqRyTwd"
        }
}

...

Response structure

...

Parameter

Type

Purpose

errorId

Integer

Error identificator.

0 - no errors, the task has been successfully created, task ID located in taskId property

1 - error, information about it is in the errorCode property

errorCode

String

Error code. Check out errors list.

taskId

Integer

Task ID for future use in

getTask

getTaskResult method.

Response example

...

Expand
titleResponse with taskid
Code Block
languagejson
{
    "errorId": 0,
    "taskId": 7654321
}

Expand
titleResponse with error
Code Block
{
  "errorId": 1,
  "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
  "errorDescription": "Account authorization key not found in the system or has incorrect format",
  "taskId": 0
}