NEWStandard createTask and in.php APIs. Change the address and you are connected.View API docs
GATESOLVER

Errors and troubleshooting

What does ERROR_INVALID_TASK_DATA mean?

Your task object is missing a field that its type requires, or a field has the wrong shape, and the errorDescription in the reply tells you which one.

The meaning

createTask validates the task before starting it. If a required field is absent or unusable, it replies with errorId: 1, errorCode: "ERROR_INVALID_TASK_DATA" and an errorDescription naming the field. No task is created and nothing is charged. In the in.php interface, the equivalent reply is ERROR_BAD_PARAMETERS. Read the description, fix that field, send again.

reply = create_task(task)
if reply.get("errorId"):
    code, detail = reply["errorCode"], reply.get("errorDescription", "")
    if code == "ERROR_INVALID_TASK_DATA":
        raise ValueError(f"task rejected, fix this field: {detail}")
    raise RuntimeError(f"{code}: {detail}")

Required fields by type

TypeRequired besides type
Any reCAPTCHA token typewebsiteURL, websiteKey
Cloudflare TurnstilewebsiteURL, websiteKey
Cloudflare ChallengewebsiteURL, proxy
AWS WAFwebsiteURL
GeeTestwebsiteURL, plus gt and challenge for v3 or captchaId for v4
MTCaptchawebsiteURL, websiteKey
DataDome SliderwebsiteURL, captchaUrl, proxy
Image to Textbody (base64)
reCAPTCHA grid imagesimage, question
AWS WAF grid imagesimages (array), question
Vision Enginemodule, image

Each type's page under supported CAPTCHAs lists optional fields as well.

Common slips

  • Field name case. websiteUrl or sitekey instead of websiteURL and websiteKey. Type names are case-insensitive, field names are not forgiving.
  • Fields outside task. websiteURL placed next to clientKey at the top level instead of inside the task object.
  • Empty values. A selector that found nothing produced an empty string or null for the site key.
  • Wrong shape. images sent as a single string instead of an array for AWS WAF classification, or proxy split into separate host and port fields.
  • Base64 prefix. Image fields must contain only the base64 data, without data:image/...;base64,.

Validate before sending

A tiny local check catches these mistakes before they cost a round trip. Keep a map of required fields per type and assert they are present and non-empty:

NEEDS = {
    "AntiCloudflareTask": ("websiteURL", "proxy"),
    "DatadomeSliderTask": ("websiteURL", "captchaUrl", "proxy"),
    "ImageToTextTask": ("body",),
}

def preflight(task):
    missing = [f for f in NEEDS.get(task["type"], ("websiteURL", "websiteKey")) if not task.get(f)]
    if missing:
        raise ValueError(f"{task['type']} is missing {', '.join(missing)}")

Related errors

ERROR_TASK_NOT_SUPPORTED means the type value itself is not one of the 14 supported types, often a typo or a type from another vendor's naming. ERROR_CAPTCHA_UNSOLVABLE means the task was valid and started but could not be solved, which points to wrong values rather than missing ones; see that page. The API docs list every error code, and the createTask migration guide covers field names when moving from other clients.

Reading the reply in practice

The description is meant for people, so log it in full next to the task you sent. A message naming websiteKey usually means your page parser returned nothing, which in turn often means the page you fetched was not the page you expected: a consent screen, a login redirect or a challenge page. Fixing the parser or the fetch solves the error at its source. If the description names proxy, check that the type you chose really needs one and that your code fills it for that type.

Testing tasks by hand first

Before wiring a new type into a job, send one task by hand with curl or a short script and read the full reply. It takes a minute and shows the exact field names and shapes that work. Copy that working task into your code as a fixture, and compare against it whenever a later change produces this error. Most validation errors in production come from code paths that build the task differently from the one you tested.

Common questions

How do I know which field is wrong?

Read errorDescription in the reply; it names the missing or invalid field.

Is a rejected task charged?

No. The task was never created, and error responses are free.

Are field names case sensitive?

Use the exact names from the docs, such as websiteURL and websiteKey; type names are case-insensitive.

What is the in.php equivalent?

ERROR_BAD_PARAMETERS, returned when required parameters are missing or unsupported.

Why does my GeeTest task fail validation?

Send gt and challenge for v3, or captchaId for v4, along with websiteURL.

Keep reading