Skip to content
Guide

CapMonster Cloud Not Working in 2026: Error Codes, TurnstileTask and cf_clearance Fixes

NSLSolver TeamPublished Updated 9 min read

When CapMonster Cloud "does not work", the response almost always tells you why: a non-zero errorId with an errorCode such as ERROR_ZERO_BALANCE, ERROR_CAPTCHA_UNSOLVABLE or ERROR_WRONG_USERAGENT. If there is no error but the site still blocks you, the task was usually created in the wrong mode (a Turnstile widget task sent for a full-page Cloudflare challenge), with stale dynamic parameters, or the result is being replayed with a different proxy or User-Agent. Match your error in the table below and apply the fix before you change tools.

Every error code and parameter on this page comes from CapMonster Cloud's own documentation at docs.capmonster.cloud, and the token and cookie rules come from Cloudflare's documentation.

Quick answer: what your CapMonster Cloud error means

createTask and getTaskResult return {"errorId": 0} on success. Any other errorId comes with an errorCode (and an errorDescription). Find yours below.

ERROR_KEY_DOES_NOT_EXIST
The API key was not found or is in the wrong format. Copy the key again from your dashboard, check that it is active, and strip spaces or newlines from the environment variable.
ERROR_ZERO_BALANCE
Not enough funds to solve. Top up the balance and resubmit the task.
CAPTCHA_NOT_READY
Not an error: the task is still being solved. Call getTaskResult again, at least 2 seconds apart. CapMonster says a Turnstile result can take 5 to 20 seconds depending on load.
ERROR_TOO_MUCH_REQUESTS
You exceeded the request limit. Increase the interval between calls; poll getTaskResult no more than once every 2 seconds.
ERROR_CAPTCHA_UNSOLVABLE
The task could not be solved. Usually temporary: create a new task. If it repeats, check that the parameters are correct and current. Unsolved tasks are not charged.
ERROR_WRONG_USERAGENT
The userAgent you sent is not accepted. Use the current value CapMonster publishes at capmonster.cloud/api/useragent/actual, then send your own requests with that same UA.
ERROR_INVALID_TASK / ERROR_TASK_NOT_SUPPORTED / ERROR_TASK_ABSENT
The task object is invalid, mistyped or missing. Read errorDescription: it names the invalid fields. Check type ("TurnstileTask"), cloudflareTaskType and that the JSON has a task object.
ERROR_PROXY_MISSING / ERROR_PROXY_NOT_AUTHORISED / ERROR_PROXY_CONNECT_REFUSED / ERROR_PROXY_BANNED
Your proxy is missing, rejected or blocked. Provide proxyType, proxyAddress and proxyPort, check proxyLogin and proxyPassword (no % character), or use a proxy the target site has not banned.
ERROR_IP_NOT_ALLOWED / ERROR_IP_BANNED / ERROR_IP_BLOCKED
Your calling IP is refused. Add your IP to the trusted list in the dashboard, or stop for a while: bans follow many invalid or failed requests.
cf_clearance returned, but the site still answers 403 / "Just a moment..."
The cookie is used outside the context it was issued for. Replay it through the same proxy and with the same userAgent you sent in the task, and send a fresh htmlPageBase64 for each solve.

Why CapMonster Cloud tasks fail

Most failures fall into one of four groups, and each has a different fix:

  • Account and request errors (key, balance, IP, malformed task). The task never reaches the solver; fix your code or dashboard settings.
  • Polling too fast. CAPTCHA_NOT_READY is normal, but calling getTaskResult in a tight loop leads to ERROR_TOO_MUCH_REQUESTS and, with enough failed calls, ERROR_IP_BANNED.
  • The wrong task mode or stale parameters. CapMonster uses one type, TurnstileTask, for a Turnstile widget and for a Cloudflare challenge page, and the two need different fields. Several values change on every page render.
  • A valid result replayed in the wrong context: different proxy, different User-Agent, or a token used after it expired.

Account, key and task errors

These come back from createTask immediately and retrying without a change will return the same error:

  • ERROR_KEY_DOES_NOT_EXIST: the key is wrong, inactive or badly formatted. ERROR_ZERO_BALANCE: top up first.
  • ERROR_IP_NOT_ALLOWED: your account restricts the key to trusted IPs; add the server's IP in the settings. ERROR_IP_BANNED and ERROR_IP_BLOCKED follow many invalid or failed requests; the docs say not to retry immediately.
  • ERROR_TASK_ABSENT (no task object or invalid JSON), ERROR_TASK_NOT_SUPPORTED and ERROR_NO_SUCH_METHOD (wrong type value): check the request structure and spelling.
  • ERROR_INVALID_TASK: the request is valid JSON but some required data is missing, invalid or expired. errorDescription lists the fields to fix.
  • ERROR_NO_SUCH_CAPCHA_ID / WRONG_CAPTCHA_ID: the taskId is wrong or its result storage period has expired. Retrying with the same taskId will not help; create a new task.
  • ERROR_DOMAIN_NOT_ALLOWED: CapMonster Cloud does not accept tasks for certain domains. There is no setting to change.

CAPTCHA_NOT_READY and ERROR_TOO_MUCH_REQUESTS: poll at the right pace

After createTask returns a taskId, call getTaskResult until the status is ready. CapMonster's guidance is to keep at least 2 seconds between getTaskResult calls; the Turnstile page says a result can take 5 to 20 seconds depending on load. A loop that sleeps 2 to 3 seconds, stops on any real error and gives up after a fixed number of attempts avoids both ERROR_TOO_MUCH_REQUESTS and runaway retries. The cf_clearance example further down includes such a loop.

ERROR_CAPTCHA_UNSOLVABLE is a different case: the task has finished and failed. Do not keep polling the same taskId; create a new task. If it repeats on one site, the parameters are the likely cause (next section).

Turnstile widget or Cloudflare challenge: pick the right TurnstileTask

CapMonster documents three set-ups under the same type, TurnstileTask. Sending the wrong one is the most common reason for unsolvable tasks or rejected results.

  • Turnstile widget on a form: websiteURL and websiteKey (format 0x4AAAAAAA...), optionally pageAction, data (cData) and userAgent. CapMonster uses its built-in proxies by default and suggests your own proxy only when the site does not accept the token. If your proxy uses IP authorization, whitelist 65.21.190.34.
  • Cloudflare challenge, token mode: add cloudflareTaskType "token", plus the required pageAction (usually "managed" or "non-interactive"), userAgent, data (cData) and pageData (chlPageData), all taken from the window.turnstile.render() call. apiJsUrl is optional. The token is then passed to the page's callback.
  • Cloudflare challenge, cookie mode: cloudflareTaskType "cf_clearance", websiteKey can be any string, htmlPageBase64 is the base64 of the 403 "Just a moment" page, userAgent is required, and a full proxy (type, address, port, login, password) is mandatory. The result is solution.cf_clearance.

Dynamic parameters and ERROR_WRONG_USERAGENT

CapMonster warns that some values are dynamic and change with each render of the page: cData, chlPageData and the challenge HTML. Extract them immediately before creating the task. A task built from a page you loaded a minute ago can fail as unsolvable, or return ERROR_TOKEN_EXPIRED ("the provided token or challenge has expired"), and resubmitting the same data returns the same error.

ERROR_WRONG_USERAGENT means the userAgent in the task is not accepted. CapMonster's docs list one current Windows Chrome value and publish the latest at capmonster.cloud/api/useragent/actual. Use that exact string in the task, and in every request you make afterwards with the result.

cf_clearance returned but the site still blocks you

A cf_clearance cookie is not a password you can paste anywhere. Cloudflare documents that the clearance cookie is tied to the specific visitor and device it was issued to, and that it stays valid for the zone's configured Challenge Passage. In practice that means:

  • Send every follow-up request through the same proxy you put in the task. A rotating proxy that changes IP between solve and replay is a common cause of an immediate new challenge.
  • Use exactly the userAgent you sent in the task, in the HTTP header and, if you use a browser, in its configuration.
  • Capture htmlPageBase64 through that same proxy and UA, right before creating the task.
  • When the clearance expires, solve again. In token mode, remember that Cloudflare documents Turnstile tokens as valid for 300 seconds and meant for single use.
  • ERROR_PROXY_BANNED means the target already blocks that proxy IP; no solve will fix it. Change the proxy.
capmonster_cf_clearance.py
import base64
import time
import requests

CM = "https://api.capmonster.cloud"
KEY = "YOUR_CAPMONSTER_KEY"
URL = "https://example.com/"
# Use the value currently published at capmonster.cloud/api/useragent/actual
UA = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) ..."
PROXY_URL = "http://user:pass@1.2.3.4:8080"
proxies = {"http": PROXY_URL, "https": PROXY_URL}

# 1) Fetch the 403 "Just a moment..." page through the SAME proxy and UA
page = requests.get(URL, headers={"User-Agent": UA}, proxies=proxies)
html_b64 = base64.b64encode(page.content).decode()

task = {
    "type": "TurnstileTask",
    "websiteURL": URL,
    "websiteKey": "xxxxxxxxxx",           # any string in cookie mode
    "cloudflareTaskType": "cf_clearance",
    "htmlPageBase64": html_b64,
    "userAgent": UA,
    "proxyType": "http",
    "proxyAddress": "1.2.3.4",
    "proxyPort": 8080,
    "proxyLogin": "user",
    "proxyPassword": "pass",
}
r = requests.post(f"{CM}/createTask", json={"clientKey": KEY, "task": task}).json()
if r["errorId"] != 0:
    raise RuntimeError(r.get("errorCode"))  # ERROR_INVALID_TASK: read errorDescription

# 2) Poll no more than once every 2 seconds
for _ in range(40):
    time.sleep(3)
    res = requests.post(f"{CM}/getTaskResult",
                        json={"clientKey": KEY, "taskId": r["taskId"]}).json()
    if res.get("errorCode") == "CAPTCHA_NOT_READY" or res.get("status") == "processing":
        continue
    if res["errorId"] != 0:
        raise RuntimeError(res.get("errorCode"))  # e.g. ERROR_CAPTCHA_UNSOLVABLE
    break

# 3) Replay with the same proxy and the same User-Agent
s = requests.Session()
s.proxies = proxies
s.headers["User-Agent"] = UA
s.cookies.set("cf_clearance", res["solution"]["cf_clearance"], domain="example.com")
print(s.get(URL).status_code)

When to switch to a Cloudflare-focused API

CapMonster Cloud covers many captcha types, and most of the errors above are configuration problems you can fix. Keep it if you need that breadth.

If your workload is mainly Cloudflare and most of your code is about capturing the challenge HTML, matching user agents and polling, a synchronous API is simpler. For reference, capmonster.cloud/en/prices lists Cloudflare Turnstile at $1.30 per 1,000 and Cloudflare Bot Challenge at $1.30 per 1,000 (checked 2026-12-01). NSLSolver charges $0.80 per 1,000 Turnstile solves and $1.00 per 1,000 Cloudflare Challenge solves, billed only on success.

NSLSolver supports Cloudflare Turnstile, Cloudflare Challenge, reCAPTCHA v3 / Enterprise, Kasada and Akamai (beta). It does not solve reCAPTCHA v2, hCaptcha, image or text captchas, FunCaptcha, GeeTest or DataDome; keep a general-purpose service for those. To compare providers on price and supported types, see CapMonster, CapSolver and 2Captcha alternatives.

The same Cloudflare challenge with NSLSolver

For a full-page challenge you send the url, the challenge site_key and your proxy; the response contains cookies (including cf_clearance) and the user_agent to replay through the same proxy. Omit user_agent in the request (or send an iPhone Safari UA), because the clearance is issued for an iPhone Safari User-Agent. A challenge averages about 3.3 s and a Turnstile token about 250 ms, with no polling.

Only automate sites you own or are authorised to access. Sign up with Google, Gmail or Proton for $0.10 of free credit (about 125 Turnstile solves), no card required.

nslsolver_challenge.py
import requests

API = "https://api.nslsolver.com"
HEADERS = {"X-API-Key": "YOUR_API_KEY"}
PROXY = "http://user:pass@host:port"

# Full-page Cloudflare challenge: no HTML capture, no polling
r = requests.post(f"{API}/solve", headers=HEADERS, json={
    "type": "challenge",
    "url": "https://example.com/",
    "site_key": "0x4AAAAAAAxxxxxxxxxxxxxxxx",
    "proxy": PROXY,
    # omit user_agent: the clearance is issued for the solver's iPhone Safari
}).json()

s = requests.Session()
s.proxies = {"http": PROXY, "https": PROXY}  # same IP as the solve
s.cookies.update(r["cookies"])                # includes cf_clearance
s.headers["User-Agent"] = r["user_agent"]     # replay exactly this UA
print(s.get("https://example.com/").status_code)

# Turnstile widget on a form: token in the same response
t = requests.post(f"{API}/solve", headers=HEADERS, json={
    "type": "turnstile",
    "site_key": "0x4AAAAAAAxxxxxxxxxxxxxxxx",
    "url": "https://example.com/login",
}).json()["token"]

Frequently asked questions

Why does CapMonster Cloud return ERROR_CAPTCHA_UNSOLVABLE?

The task could not be solved. CapMonster describes it as usually temporary: create a new task, and if it repeats, check that the parameters are correct and current. Unsolved tasks are not charged. For Cloudflare, also make sure you used the right TurnstileTask mode and fresh cData, chlPageData or challenge HTML.

What does CAPTCHA_NOT_READY mean in CapMonster?

The task is still being solved. Call getTaskResult again later, at least 2 seconds apart. Polling faster leads to ERROR_TOO_MUCH_REQUESTS. A Turnstile result typically takes 5 to 20 seconds depending on load.

How do I fix ERROR_WRONG_USERAGENT?

Send the User-Agent CapMonster currently supports. Its documentation lists the value and publishes the latest at capmonster.cloud/api/useragent/actual. Use that same string for every request you make with the token or cf_clearance cookie.

Why is my CapMonster cf_clearance cookie not working?

Usually because it is replayed in a different context. Cloudflare ties clearance to the visitor and device it was issued to, so use the same proxy and the same userAgent you sent in the task, build htmlPageBase64 from a fresh 403 page fetched through that proxy, and solve again when the clearance expires.

What is the difference between cloudflareTaskType token and cf_clearance?

Token mode solves the Turnstile on a challenge page and returns a token for the page callback; it needs pageAction, userAgent, data and pageData. Cookie mode (cf_clearance) takes the base64 of the 403 challenge page plus your own proxy and returns the cf_clearance cookie directly.

Is there an alternative to CapMonster for Cloudflare?

If your traffic is mostly Cloudflare, NSLSolver returns a Turnstile token or a cf_clearance cookie plus user_agent in one synchronous call, from $0.80 per 1,000 Turnstile solves, billed only on success. It does not support reCAPTCHA v2, hCaptcha or image captchas.

Clear Cloudflare in one call

No challenge HTML to capture and no polling: send the URL and your proxy, get cf_clearance and the matching user_agent back. Free credit with Google, Gmail or Proton sign-up, no card needed.