Looking for an overview? See the Cloudflare Turnstile product page

Resolving Cloudflare Turnstile & WAF Errors

Cloudflare provides multiple protection layers including Turnstile (CAPTCHA alternative) and WAF rules. Turnstile generates JavaScript tokens for verification, while WAF blocks return 403/429 status codes. MeshPrivacy handles both Turnstile token resolution and WAF challenge resolution.

Turnstile Error Codes

Code RangeMeaningRetry?
100***Initialization failedNo - reload page
102***Network/parameter issuesYes
103***Browser compatibilityYes
110100Invalid sitekeyNo - check config
300***Bot behavior detectedNo
600***Challenge execution failedNo - automation detected

WAF Error Codes

CodeMeaningResolution
403WAF rule triggeredResolve challenge via API
429Rate limit exceededReduce frequency, obtain clearance
530Site frozen/suspendedContact site owner
520Web server down (WAF blocking)Retry with valid clearance

Service Variants

turnstile Primary

Cloudflare Turnstile token resolution. Returns a valid token that can be submitted with forms or API requests. Token TTL: approximately 5 minutes.

cloudflare_waf

Cloudflare WAF challenge resolution. Solves JavaScript challenges and returns cf_clearance cookie for subsequent requests.

Integration Example

// Submit Cloudflare Turnstile task to MeshPrivacy
const response = await fetch('https://api.meshprivacy.com/v1/tasks/submit', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'X-API-Key': API_KEY
  },
  body: JSON.stringify({
    service: 'turnstile',
    url: 'https://target-site.com/',
    sitekey: '0x4AAAAAA...', // From page source data-sitekey attribute
    proxy_config: 'http://user:pass@ip:port', // Your proxy
    user_agent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36...'
  })
});

const { task_id } = await response.json();

// Poll for result
const result = await fetch(`https://api.meshprivacy.com/v1/tasks/result/${task_id}`, {
  headers: { 'X-API-Key': API_KEY }
});

const { token } = await result.json();
// Submit token with your form as cf-turnstile-response

FAQ

Where do I find the Turnstile sitekey?

The sitekey is in the page HTML, typically in a data-sitekey attribute on the Turnstile widget div, or passed to the turnstile.render() function.

How long are Turnstile tokens valid?

Turnstile tokens are valid for approximately 5 minutes from generation. Submit tokens promptly after receiving them from the API.

What's the difference between Turnstile and cf_clearance?

Turnstile is an explicit challenge (like CAPTCHA) that returns a token for form submission. cf_clearance is a cookie from WAF challenges that grants access to protected pages.

Related Services