Skip to main content
Are you experiencing issues obtaining the token?
Contact support

Cloudflare Waiting Room

This is a new Cloudflare protection mechanism: the user must wait on average ~3 minutes before accessing the resource:

You can also identify this Cloudflare type via the page header:

More on the topic in our blog
More on the topic in our blog
Attention!
  • Use your own proxies for this task.

  • After solving, you will receive special cookies to add to your browser.

Request parameters


IMPORTANT: retrieve htmlPageBase64 immediately before creating the task to avoid errors during solving (see the example of obtaining htmlPageBase64 below).


type<string>required

TurnstileTask


websiteURL<string>required

The URL of the page containing the check


websiteKey<string>required

Cloudflare key. Any string may be provided, for example: xxxxxx.


cloudflareTaskType<string>required

wait_room


htmlPageBase64<string>required

Base64-encoded HTML page containing <title>Waiting Room powered by Cloudflare</title>
Example to get htmlPageBase64:

var serializer = new XMLSerializer();
var fullHtml = serializer.serializeToString(document);

var htmlBase64 = btoa(unescape(encodeURIComponent(fullHtml)));
console.log(htmlBase64);

userAgent<string>required

Browser User-Agent. Use the current value supported by CapMonster Cloud: userAgentPlaceholder

You can get the latest value at: https://capmonster.cloud/api/useragent/actual.


proxyType<string>required

http - regular HTTP/HTTPS proxy;
https - use if http doesn’t work (required for some custom proxies);
socks4 - SOCKS4 proxy;
socks5 - SOCKS5 proxy.


proxyAddress<string>required

Proxy IP address (IPv4/IPv6). Not allowed:

  • Transparent proxies
  • Local machine proxies


proxyPort<integer>required

Proxy port.


proxyLogin<string>required

Proxy login.


proxyPassword<string>required

Proxy password.


Create task method

POST
https://api.capmonster.cloud/createTask

Request example

{
"clientKey": "API_KEY",
"task": {
"type": "TurnstileTask",
"websiteURL": "https://yourwebsite.com/page-with-cf-waitroom",
"websiteKey": "xxxxxxxxxx",
"cloudflareTaskType": "wait_room",
"htmlPageBase64": "PCFET0NUWVBFIGh0...vYm9keT48L2h0bWw+",
"userAgent": "userAgentPlaceholder",
"proxyType": "your-proxy-type",
"proxyAddress": "your-proxy-address",
"proxyPort": 1234,
"proxyLogin": "your-proxy-login",
"proxyPassword": "your-proxy-password"
}
}

Response example

{
"errorId":0,
"taskId":407533072
}

Get task result method

Use the getTaskResult method to retrieve the Waiting Room solution. Depending on system load, the response can take between 5 and 20 seconds.

POST
https://api.capmonster.cloud/getTaskResult

Request example

{
"clientKey": "API_KEY",
"taskId": 407533072
}

Response example

{
"errorId": 0,
"status": "ready",
"solution": {
"cf_clearance": "1tarGvbY2_ZhQdYxpSBloao.FoOn9VtcJtmb_IQ_hCE-1761217338-1.2.1.1-vyVPoLYIGX0VCJomVuLjF7n0kdM0PXaPjpDsRcohxGr7hb2CE7WfcHpmQZ70goqEjdWxPsDhSVaKNTz9opxWguiNdWEEq_.SceWXIqfP7tnEb69f3bP0mixNqcWy_5P_9INpoAEqr1k7aYU0r45PT4gPr5pwHxedVySyLRdoBXIJasdTE52YOQ3NPdGWTwQ_3h2n_wYqqIvf0kCSAvimRrmsgZxomlyejwqPI6ZHi.w"
}
}
PropertyTypeDescription
cf_clearanceStringSpecial Cloudflare cookies that you can set in your browser

Use the SDK library

Show code (for browser)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver

import {
CapMonsterCloudClientFactory,
ClientOptions,
TurnstileRequest
} from "@zennolab_com/capmonstercloud-client";

document.addEventListener("DOMContentLoaded", async () => {

const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key

const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY })
);

// Cloudflare Waiting Room can only be solved using your own proxy
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};

const turnstileRequest = new TurnstileRequest({
websiteURL: "https://yourwebsite.com/page-with-waiting-room",
websiteKey: "xxxxxxxxxx",
cloudflareTaskType: "wait_room",
proxy,
htmlPageBase64: "your_html_page_base64",
userAgent: "userAgentPlaceholder",
});

// You can check your balance if necessary
const balance = await client.getBalance();
console.log("Balance:", balance);

const result = await client.Solve(turnstileRequest);
console.log("Solution:", result.solution);
});
Show code (Node.js)
// https://github.com/CapMonsterCloud/capmonster-nodejs-captcha-solver

const {
CapMonsterCloudClientFactory,
ClientOptions,
TurnstileRequest,
} = require("@zennolab_com/capmonstercloud-client");

const API_KEY = "YOUR_API_KEY"; // Specify your CapMonster Cloud API key

async function solveTurnstileWaitRoom() {
const client = CapMonsterCloudClientFactory.Create(
new ClientOptions({ clientKey: API_KEY }),
);

// Cloudflare Waiting Room can only be solved using your own proxy
const proxy = {
proxyType: "http",
proxyAddress: "123.45.67.89",
proxyPort: 8080,
proxyLogin: "username",
proxyPassword: "password",
};

const turnstileRequest = new TurnstileRequest({
websiteURL: "https://yourwebsite.com/page-with-waiting-room",
websiteKey: "xxxxxxxxxx",
cloudflareTaskType: "wait_room",
proxy,
htmlPageBase64: "your_html_page_base64",
userAgent: "userAgentPlaceholder",
});

// You can check your balance if necessary
const balance = await client.getBalance();
console.log("Balance:", balance);

const result = await client.Solve(turnstileRequest);
console.log("Solution:", result.solution);
}

solveTurnstileWaitRoom().catch(console.error);