Blog
How to solve Cloudflare Turnstile

How to solve Cloudflare Turnstile

Logo of Capsolver

CapSolver Blogger

How to use capsolver

13-May-2023

How to solve Cloudflare Turnstile

Cloudflare Turnstile

Cloudflare Turnstile is an innovative solution designed to enhance web security. As a sophisticated variant of a CAPTCHA system.

The Advantages of Cloudflare Turnstile

  • User Experience: Unlike conventional CAPTCHA systems, which can often be frustrating for users due to difficult-to-decipher text or images, Turnstile focuses on delivering an intuitive, user-friendly interface.

  • Robust Security: Turnstile acts as a reliable line of defense against unwanted spam, bots, and other forms of automated abuse, thereby enhancing your site's security.

  • Seamless Integration: Being an integral part of the Cloudflare suite of services, Turnstile implementation is straightforward and efficient for those already utilizing Cloudflare's offerings.

How Does Turnstile Compare to Other CAPTCHAs?

  • User-Centric Design: Traditional CAPTCHA systems often prioritize security at the expense of user experience. Turnstile, however, strikes a balance between maintaining security and ensuring a smooth user experience.

  • Reliable Protection: While the primary purpose of all CAPTCHA systems is to distinguish humans from bots, the effectiveness of these systems can vary significantly. The efficiency of Turnstile, in particular, would depend on its correct implementation and the threat model it's up against.

  • Smooth Integration: Using Turnstile could be more streamlined than integrating a third-party CAPTCHA solution, especially for existing Cloudflare users.

Turnstiles types Supported by Capsolver

The Turnstile/Challenge verification code is another attempt to replace reCaptcha/hCaptcha. We automatically support all of its subtypes:

  • Manually
  • Non-Interactive
  • Invisible

How to solve Cloudflare Turnstile

Before we start solving Cloudflare, there are some requeriments and points that we need to be aware that they are needed to know
Requeriments:

  • Capsolver Key
  • Proxy

Points to be aware that if we don't follow, solution will be invalid:

  • Token returned in the response of the method getTaskResult is the captcha solved token.
  • Must use the same user-agent that the method getTaskResult return
  • Must use the same proxy IP used for solve the challenge

To solve cloudflare turnstile, follow our link. Some parameters are required and some are optional.
For this example, we will only use the required parameters. The task types for cloudflare are:

  • AntiCloudflareTask: This task type requires your own proxies.

We will use AntiCloudflareTask as the site uses Cloudflare Turnstile.
If any parameters are missing or you don't submit correctly, you will likely encounter issues with the token not being accepted by the website. You can find all the parameters in this picture:

Task Object Structure for solve Cloudflare Turnstile Captcha

Step 1: Submitting the information to capsolver

Use the method createTask to submit the information required:

POST https://api.capsolver.com/createTask

{
  "clientKey": "Your_API_KEY",
  "task": {
    "type": "AntiCloudflareTask",
    "websiteURL": "site",
    "websiteKey": "siteKey",
    "proxy": "Your_Proxy"
  }
}

Step 2: Getting the results

To verify the results, you'll need to continuously poll the getTaskResult API endpoint until the captcha is resolved.

Here's an example request:

POST https://api.capsolver.com/getTaskResult
Host: api.capsolver.com
Content-Type: application/json

{
    "clientKey":"YOUR_API_KEY",
    "taskId": "TASKID_OF_CREATETASK" //ID created by the createTask method
}

Once the captcha is successfully resolved, you'll receive a response similar to the one depicted in the following image:
Cloudflare Turnstile Solved

The captcha token received can be verified by submitting the cookie token, use the same proxy IP used for solve the captcha and also the same user-agent that we return you in the response to the relevant site.

⚠️ If the token is rejected, it may indicate that some information is missing or incorrect. Make sure you are using the same proxy IP used for solve the captcha turnstile and also the same user-agent that it's returned to you in the response.

If you want to solve Cloudflare Challenge 5s IUAM. Please refer to this blog: link
In conclusion, while solving cloudflare turnstile may seem a daunting task, capsolver.com makes the process swift and efficient. By following the steps outlined above, you can easily resolve cloudflare.

Capsolver Team 💜

More