Cloudflare WAF challenge test page
Cloudflare 5-second JS challenge test page
This page sits behind a Cloudflare WAF custom rule whose action is the Non-Interactive Challenge, often still called the JS Challenge after its API value, js_challenge: the browser must run Cloudflare's JavaScript, which usually takes a few seconds, and never has to click. Reaching this text means you passed.
Your pass
LiveOn the way in
A Cloudflare WAF rule with the Non-Interactive Challenge (JS Challenge) action stands in front of this page: a browser without a clearance meets Cloudflare's challenge page before this one.
Checking your clearance…
Asking whether your browser sent cf_clearance with this page.
- WAF rule action
js_challenge(Non-Interactive Challenge (JS Challenge))- Rule
- Live on this site
- Clearance level
- Non-interactive: passes JS challenges only
- cf_clearance sent
- checking…
- Through Cloudflare
- checking…
- Clearance lasts
- As long as the site accepts it: its Challenge Passage, 30 minutes by default. A task's result stays available from the API for 30 minutes after the solve.
Checking whether your browser holds a cf_clearance cookie for this site…
Test it again
A private window holds no clearance, so Cloudflare challenges it again: copy this page's link and open it there. Or point a task at the page, below.
Point your solver here
- websiteURL
- https://zerocaptcha.io/captcha-test/cloudflare-js-challenge
- proxy
- Yours, and required: HTTP or HTTPS, one fixed address. The clearance works only from it.
- type
- CloudflareChallengeTask$0.80 per 1,000 solved. Returns cf_clearance and the user agent it was issued to.
Charged only when the clearance is ready. A failed task costs $0.
What a task returns
A CloudflareChallengeTask opens this page through your proxy in a real browser and passes the challenge. Once it is ready, getTaskResult holds what that browser earned.
- solution.cookies.cf_clearance
- The clearance. Send it as the cf_clearance cookie with every request to the site.
- solution.userAgent
- The browser it was issued to. Send it as the User-Agent header, unchanged.
- expiresAt
- When the API stops serving it: 30 minutes after the solve. The site's Challenge Passage decides how long Cloudflare accepts it.
{
"errorId": 0,
"taskId": "0192f3a4-7b1c-7d2e-9f10-3c4d5e6f7a8b",
"status": "ready",
"solution": {
"type": "cloudflare",
"token": "Dyw1BhDnEAGRy5fh…",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/151.0.0.0 Safari/537.36",
"cookies": { "cf_clearance": "Dyw1BhDnEAGRy5fh…" }
},
"expiresAt": "2026-09-30T14:32:14Z"
}Send the cookie and the user agent with every request, through the same proxy: Cloudflare ties the clearance to the visitor and device it was issued to. When the site challenges you again, create a new task.
The API
Solve this page with the API
The complete createTask request for this page, then getTaskResult every 2 seconds until it is ready, then the result used as the page uses it. Set ZEROCAPTCHA_KEY to your API key, and PROXY_URL to your proxy.
- type
- CloudflareChallengeTask
- websiteURL
- https://zerocaptcha.io/captcha-test/cloudflare-js-challenge
- proxy
- Required, sticky or static: the clearance works only from its address
- callbackUrl
- Optional: called with the result when the task ends
- Idempotency-Key
- A header: sent again within 24 hours, it returns the first task
A task is charged at the listed price when it succeeds; a failed one costs nothing. The same task over REST, POST /v1/tasks, is in Cloudflare WAF and 5-second challenges.
#!/usr/bin/env bash
# Pass this page's Cloudflare challenge through your proxy with createTask, then load the page
# with the clearance.
set -euo pipefail
API=${ZEROCAPTCHA_API:-https://api.zerocaptcha.io}
KEY=${ZEROCAPTCHA_KEY:?Set ZEROCAPTCHA_KEY to your API key, zc_live_..., from the dashboard.}
PROXY=${PROXY_URL:?Set PROXY_URL to your proxy, such as http://user:pass@proxy.example.net:8080}
PAGE=https://zerocaptcha.io/captcha-test/cloudflare-js-challenge
# 1. createTask for this page, through the proxy you will browse with: the clearance only works
# from its address. CALLBACK_URL, when set, is called with the result when the task ends.
BODY=$(jq -n --arg key "$KEY" --arg proxy "$PROXY" --arg callback "${CALLBACK_URL:-}" '{
clientKey: $key,
task: {
type: "CloudflareChallengeTask",
websiteURL: "https://zerocaptcha.io/captcha-test/cloudflare-js-challenge",
proxy: $proxy
},
callbackUrl: (if $callback == "" then null else $callback end)
}')
CREATED=$(curl -sS --fail-with-body "$API/createTask" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d "$BODY")
# errorId 1 is a refusal: errorCode and errorDescription say why.
if [ "$(jq -r .errorId <<<"$CREATED")" != 0 ]; then echo "$CREATED" >&2; exit 1; fi
TASK_ID=$(jq -r .taskId <<<"$CREATED")
# 2. getTaskResult every 2 seconds until the task is ready; errorId 1 means it failed, unpaid.
while :; do
sleep 2
RESULT=$(curl -sS --fail-with-body "$API/getTaskResult" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg key "$KEY" --arg id "$TASK_ID" '{clientKey: $key, taskId: $id}')")
if [ "$(jq -r .errorId <<<"$RESULT")" != 0 ]; then echo "$RESULT" >&2; exit 1; fi
if [ "$(jq -r .status <<<"$RESULT")" = ready ]; then break; fi
done
CLEARANCE=$(jq -r .solution.cookies.cf_clearance <<<"$RESULT")
USER_AGENT=$(jq -r .solution.userAgent <<<"$RESULT")
# 3. Come back as the browser that passed: the same proxy, user agent and cookie. A client whose
# TLS does not look like that browser may be challenged again (use curl-impersonate).
curl -sS -o /dev/null -w "page: HTTP %{http_code}\n" \
-x "$PROXY" -A "$USER_AGENT" -b "cf_clearance=$CLEARANCE" "$PAGE"
curl -sS -x "$PROXY" -A "$USER_AGENT" -b "cf_clearance=$CLEARANCE" \
"https://zerocaptcha.io/api/v1/demo/clearance"
# Pass this page's Cloudflare challenge through your proxy with createTask, then load the page
# with the clearance.
import os
import sys
import time
import uuid
import requests
API = os.environ.get("ZEROCAPTCHA_API", "https://api.zerocaptcha.io")
PAGE = "https://zerocaptcha.io/captcha-test/cloudflare-js-challenge"
KEY = os.environ.get("ZEROCAPTCHA_KEY") or sys.exit("Set ZEROCAPTCHA_KEY to your API key, zc_live_..., from the dashboard.")
PROXY = os.environ.get("PROXY_URL") or sys.exit("Set PROXY_URL to your proxy, such as http://user:pass@proxy.example.net:8080")
def post(path, body, headers=None):
"""POSTs JSON to the API: the reply, or an exit with the reason it was refused."""
reply = requests.post(f"{API}{path}", json=body, headers=headers or {}, timeout=30)
reply.raise_for_status()
data = reply.json()
if data.get("errorId"):
sys.exit(f"{data['errorCode']}: {data['errorDescription']}")
return data
# 1. createTask for this page, through the proxy you will browse with: the clearance only works
# from its address.
created = post(
"/createTask",
{
"clientKey": KEY,
"task": {
"type": "CloudflareChallengeTask",
"websiteURL": "https://zerocaptcha.io/captcha-test/cloudflare-js-challenge",
"proxy": PROXY,
},
# Optional: called with the result when the task ends.
"callbackUrl": os.environ.get("CALLBACK_URL"),
},
headers={"Idempotency-Key": str(uuid.uuid4())},
)
# 2. getTaskResult every 2 seconds until the task is ready; a failed one exits, unpaid.
while True:
time.sleep(2)
result = post("/getTaskResult", {"clientKey": KEY, "taskId": created["taskId"]})
if result["status"] == "ready":
break
# 3. Come back as the browser that passed: the same proxy, user agent and cookie. A client whose
# TLS does not look like that browser may be challenged again (try curl_cffi).
session = requests.Session()
session.proxies = {"http": PROXY, "https": PROXY}
session.headers["User-Agent"] = result["solution"]["userAgent"]
session.cookies.set("cf_clearance", result["solution"]["cookies"]["cf_clearance"])
page = session.get(PAGE, timeout=30)
print("page:", page.status_code, page.headers.get("cf-mitigated", "not challenged"))
print(session.get("https://zerocaptcha.io/api/v1/demo/clearance", timeout=30).json())
// Pass this page's Cloudflare challenge through your proxy with createTask, then load the page
// with the clearance.
import { ProxyAgent, fetch as proxied } from "undici";
const API = process.env.ZEROCAPTCHA_API || "https://api.zerocaptcha.io";
const PAGE = "https://zerocaptcha.io/captcha-test/cloudflare-js-challenge";
const KEY = process.env.ZEROCAPTCHA_KEY;
const PROXY = process.env.PROXY_URL; // such as http://user:pass@proxy.example.net:8080
if (!KEY || !PROXY) throw new Error("Set ZEROCAPTCHA_KEY to your API key and PROXY_URL to your proxy.");
/** POSTs JSON to the API: the reply, or an error with the reason it was refused. */
async function post(path, body, headers = {}) {
const reply = await fetch(`${API}${path}`, {
method: "POST",
headers: { "Content-Type": "application/json", ...headers },
body: JSON.stringify(body),
});
if (!reply.ok) throw new Error(`${path}: HTTP ${reply.status}: ${await reply.text()}`);
const data = await reply.json();
if (data.errorId) throw new Error(`${data.errorCode}: ${data.errorDescription}`);
return data;
}
// 1. createTask for this page, through the proxy you will browse with: the clearance only works
// from its address.
const { taskId } = await post(
"/createTask",
{
clientKey: KEY,
task: {
type: "CloudflareChallengeTask",
websiteURL: "https://zerocaptcha.io/captcha-test/cloudflare-js-challenge",
proxy: PROXY,
},
// Optional: called with the result when the task ends.
callbackUrl: process.env.CALLBACK_URL,
},
{ "Idempotency-Key": crypto.randomUUID() },
);
// 2. getTaskResult every 2 seconds until the task is ready; a failed one throws, unpaid.
let result;
do {
await new Promise((resolve) => setTimeout(resolve, 2000));
result = await post("/getTaskResult", { clientKey: KEY, taskId });
} while (result.status === "processing");
// 3. Come back as the browser that passed: the same proxy, user agent and cookie. A client whose
// TLS does not look like that browser may be challenged again.
const { userAgent, cookies } = result.solution;
const dispatcher = new ProxyAgent(PROXY);
const asCleared = { "User-Agent": userAgent, Cookie: `cf_clearance=${cookies.cf_clearance}` };
const reply = await proxied(PAGE, { dispatcher, headers: asCleared });
console.log("page:", reply.status, reply.headers.get("cf-mitigated") ?? "not challenged");
const check = await proxied("https://zerocaptcha.io/api/v1/demo/clearance", { dispatcher, headers: asCleared });
console.log(await check.json());
- File
- challenge.sh 47 lines
- Needs
- bash, curl, jq and uuidgen
- Run
bash challenge.sh
- File
- challenge.py 59 lines
- Needs
- Python 3.10 or later and the requests package
- Run
python challenge.py
- File
- challenge.mjs 57 lines
- Needs
- Node.js 22 or later, and undici for the proxy
- Run
node challenge.mjs
About this challenge
What this challenge is
The Non-Interactive Challenge, API value js_challenge, asks nothing of the visitor but a browser that runs its JavaScript to the end. Cloudflare says it typically takes less than five seconds. Its clearance is the lowest level and covers only Non-Interactive challenges.
Tools without a JavaScript engine, such as curl or wget, cannot pass it; a browser, or a task that runs one, can.
| You hold | Interactive | Managed | Non-interactive |
|---|---|---|---|
| Interactive clearance | passes | passes | passes |
| Managed clearance | does not pass | passes | passes |
| Non-interactive clearance (this page) | does not pass | does not pass | passes |
From Cloudflare's documentation, as the guides and posts cite it (checked 1 October 2026).
How to use the result
The task's result is the cf_clearance cookie and the user agent it was issued to. Send both with every request to the site, through the same proxy the task used: Cloudflare ties the cookie to "the specific visitor and device it was issued to", which in practice means that address and that user agent.
The clearance lasts for the zone's Challenge Passage time, 30 minutes by default, and covers challenge rules at its level or below. A client whose TLS handshake does not look like the browser its user agent names may be challenged again, so use a browser or a client that impersonates one.
How to recognise it on a real site
- The first response has the header
cf-mitigated: challengeand the content type text/html, whatever was asked for; in our checks the status was 403 and the page title "Just a moment...". - The challenge page loads its scripts from the site's own
/cdn-cgi/challenge-platform/path, then posts its result there and reloads the page. - Passing sets the
cf_clearancecookie on the site, withSameSite=None, Secure and Partitioned.
<!-- The first response: HTTP 403, cf-mitigated: challenge, text/html -->
<title>Just a moment...</title>
<script>window._cf_chl_opt = { /* the challenge's settings */ };</script>
<script src="/cdn-cgi/challenge-platform/h/b/orchestrate/chl_page/v1?ray=…"></script>
<!-- Passing sets: cf_clearance=…; SameSite=None; Secure; Partitioned -->Which ZeroCaptcha task passes the Cloudflare 5-second JS challenge?
CloudflareChallengeTask, with the page's URL and your proxy. It returns the cf_clearance cookie and the user agent it was issued to; there is no proxyless challenge task, because the cookie only works from the address that earned it.
Is the JS challenge the same as the Non-Interactive Challenge?
Yes. Cloudflare's documentation names it the Non-Interactive Challenge, and its API value is js_challenge, which is why it is often still called the JS Challenge.
Is this the Cloudflare 5-second challenge?
It is what that name means today. The 5-second challenge was the old name for Cloudflare's JavaScript challenge page, after the few seconds it took; a WAF rule's Non-Interactive Challenge is its current form, and Cloudflare says it typically takes less than five seconds.
Does solving a demo page cost anything?
A task pointed at a demo page is an ordinary task: it is charged at the price list's rate when it succeeds, and a failed or expired task costs nothing. Opening the page and checking its token are not charged.
ZeroCaptcha You build. We solve.
Point a task at this page
Create an account, add $10 and run your first task.