TurnstileToken
Solve a Cloudflare Turnstile widget through your own proxy, for sites that tie the token to your address. With the schema, an example and provider prices.
TurnstileToken solves a Cloudflare Turnstile widget through your proxy and returns the token you submit with the form. It solves the same widget as TurnstileTokenProxyLess, which also shows how to recognize the widget and compares it with the other Cloudflare tasks.
Use it when the site checks that the address redeeming a token is the one that solved it, for example by pairing the token with a session or a clearance cookie. The symptom is a valid token that the site rejects, while the same flow works from the browser you proxy through.
Use your proxy
task.proxy is required on this task type, and the provider solves from that address. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Send the proxy you will submit the form through, so the solve and the submission use one address.
Find the parameters
websiteURL, websiteKey, pageAction and data work as in TurnstileTokenProxyLess.
Send userAgent with the User-Agent of the client you submit from, so the solve and the submission agree.
Submit the token as described in TurnstileTokenProxyLess.
Challenge pages
A widget in a page that loads is Turnstile. A full-page "Just a moment..." interstitial is a different mechanism, even though Turnstile runs inside it. Use CloudflareChallengeCookie for that.
A challenge page's turnstile.render() call carries pageAction, data and pageData (chlPageData). Providers that solve a challenge page through this task read them.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $1.45 | |
Anti-Captcha | $2.00 | |
CapMonster | $1.30 | |
RiskBypass | $1.00 | |
Nslsolver | $0.80 | |
EZCaptcha | $1.00 | |
SolveCaptcha | $0.80 | |
WTFSolve | $0.20 | |
AnyFlare | $0.10 | |
Solverify | $0.10 | |
PeakFO | $0.90 | |
Iso | $1.00 | |
SCTG | $0.24 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes. View settings reference |
Task Object Properties
The task field accepts an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
websiteURL* | URL | Yes | Full URL of the page where the CAPTCHA is displayed. Example: |
websiteKey* | string | Yes | The sitekey found in the CAPTCHA HTML element on the target page. Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
pageAction | string | No | Custom action of the widget: the action option of turnstile.render() or the data-action attribute, up to 32 characters (letters, digits, _ and -), such as login. On Cloudflare challenge pages it is the action value of the turnstile.render() call (for example managed). Example: |
data | string | No | Custom payload of the widget: the cData option of turnstile.render() or the data-cdata attribute, up to 255 characters. On Cloudflare challenge pages, copy the cData value of the turnstile.render() call. Example: |
pageData | string | No | Value of chlPageData in the turnstile.render() call of a Cloudflare challenge page. Only needed for challenge pages, not for a standalone widget. Example: |
userAgent | string | No | Browser User-Agent string. Must match the browser used on the target page. Not all providers properly support this parameter. Verify the compatibility with the provider you are using. Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TurnstileToken",
"websiteURL": "https://2captcha.com/demo/cloudflare-turnstile",
"websiteKey": "3x00000000000000000000FF",
"proxy": "http://user:pass@1.2.3.4:8080"
}
}Optional fields are not guaranteed across providers
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
token* | string | Yes | The solved CAPTCHA token to submit with your form. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |
userAgent | string | No | User-Agent string used during solving. |