Blog
Bypass reCaptcha v2

Bypass reCaptcha v2

Logo of Capsolver

CapSolver Blogger

How to use capsolver

18-May-2023

Bypassing reCaptcha V2 with CapSolver API

If you're struggling with reCaptcha v2 and need a way to bypass it, this guide is for you. We'll use the CapSolver API to bypass reCaptcha v2 easily. You can either use your own proxies with ReCaptchaV2Task or use the server's built-in proxy with ReCaptchaV2TaskProxyLess.

Creating a Task

To bypass reCaptcha v2, you first need to create a task using the createTask method.

Here's the structure of the task object:

  • type: Required. This should be ReCaptchaV2Task or ReCaptchaV2TaskProxyLess.
  • websiteURL: Required. This is the web address of the website using reCaptcha v2.
  • websiteKey: Required. This is the domain's public key.
  • proxy: Optional. If you're using a proxy, you can include it here.
  • isInvisible: Optional. If the reCaptcha doesn't have pageAction, set this to true.
  • userAgent: Optional. If you're emulating a browser, include its User-Agent here.
  • cookies: Optional. If you need to use cookies, include them here.

Here's an example request:

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "ReCaptchaV2Task",
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    "isInvisible": false,
    "userAgent": "",
    "cookies": [
      {
        "name": "__Secure-3PSID",
        "value": "sdadasdasdsda"
      },
      {
        "name": "__Secure-3PAPISID",
        "value": "sd/AytXQTb6RUALqxSEL"
      }
    ],
    "proxy": ""
  }
}

Once the task is successfully submitted, you'll receive a Task ID in the response:

{
    "errorId": 0,
    "errorCode": "",
    "errorDescription": "",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

Getting Results

Once you have the Task ID, you can use it to retrieve the solution. Submit the Task ID with the getTaskResult method. The results should be ready within an interval of 1s to 10s.

Here's an example request:

{
    "clientKey": "YOUR_API_KEY",
    "taskId": "61138bb6-19fb-11ec-a9c8-0242ac110006"
}

The response will include the solution token:

{
    "errorId": 0,
    "errorCode": null,
    "errorDescription": null,
    "solution": {
        "userAgent": "xxx", 
        "expireTime": 1671615324290, 
        "gRecaptchaResponse": "3AHJ....." // This is the solution token
    },
    "status": "ready"
}

Bypass reCaptcha v2 with Python:

# Install the CapSolver SDK
# pip install --upgrade capsolver

# Set the CapSolver API key
# export CAPSOLVER_API_KEY='YOUR_API_KEY'

import capsolver
# capsolver.api_key = 'YOUR_API_KEY'

# Solve a reCAPTCHA v2 challenge
solution = capsolver.solve({
    "type": "ReCaptchaV2TaskProxyLess",
    "websiteURL": "https://www.google.com/recaptcha/api2/demo",
    "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
})

Bypass reCaptcha v2 with GO:

package main

import (
    "fmt"
    capsolver_go "github.com/capsolver/capsolver-go"
    "log"
)

func main() {
    // Install the CapSolver SDK
    // go get github.com/capsolver/capsolver-go

    // Set the CapSolver API key
    // export CAPSOLVER_API_KEY='YOUR_API_KEY'
    // or
    // capSolver := CapSolver{apiKey:"YOUR_API_KEY"}

    capSolver := capsolver_go.CapSolver{}
    solution, err := capSolver.Solve(map[string]any{
        "type": "ReCaptchaV2TaskProxyLess",
        "websiteURL": "https://www.google.com/recaptcha/api2/demo",
        "websiteKey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
    })
    if err != nil {
        log.Fatal(err)
        return
    }
    fmt.Println(solution)
}

Please replace YOUR_API_KEY with your actual CapSolver API key, and replace the websiteURL and websiteKey with the actual website URL and website key for the reCAPTCHA challenge you are trying to solve

Pricing

For information on pricing, please visit our pricing page.

More Information of how to solve reCaptcha v2

Visit this page

Capsolver Team 💜

More

How to Identify the Version of reCaptcha
How to Identify the Version of reCaptcha

In this article, we will show you how to identify what reCaptcha version is being used.

reCAPTCHA

19-Sep-2023

Bypassing reCaptcha V2 with Python
How to solve reCaptcha v2 with Python

In this article, we will show you how to solve reCaptcha v2 with Python

reCAPTCHA

19-Sep-2023

How to solve reCaptcha v3 with Node.JS
How to solve reCaptcha v3 with Node.JS

In this article, we will show you how to solve reCaptcha v3 with Node.JS

reCAPTCHA

15-Sep-2023

How to solve reCaptcha v3 with Python
How to solve reCaptcha v3 with Python

In this article, we will show you how to solve reCaptcha v3 with Python.

reCAPTCHA

15-Sep-2023

Bypass reCaptcha v3
Bypass reCaptcha v3

In the guide that follows, we aim to unravel the seemingly complex procedure of seamlessly navigating through reCaptcha v3 and achieving a score indicative of human interaction, using the cutting-edge tool, CapSolver. For those unfamiliar, reCaptcha v3 is a contemporary security mechanism offered by Google, engineered to shield websites from bot activities without requiring user input. In contrast to its previous versions, reCaptcha v3 computes and delivers a score that predicts if the engagement is human or bot-driven, rather than posing a challenge to be solved. As user-friendly and efficient as this tool is, it may inadvertently create obstacles for genuine users, interfering with their seamless digital navigation. This is where CapSolver steps in. CapSolver is an advanced tool devised to assist users in smoothly traversing through reCaptcha v3. It's specially designed to interact with reCaptcha in a manner that simulates human behavior, hence achieving a score akin to a human user. By having CapSolver on hand, you can guarantee a more streamlined online journey, devoid of the typical CAPTCHA-related delays or disruptions. Throughout this guide, we'll walk you through each step, transforming complex tech terminology into easily digestible information. Our goal is to deliver a comprehensive understanding of how to employ CapSolver effectively, enabling you to navigate through reCaptcha v3 with relative simplicity. We want to make it clear that this guide is meant to support genuine users in their journey through reCaptcha v3, and does not endorse any unethical activities or attempts to compromise website security. Whether you're a professional exploring the digital world or an everyday internet user, gaining a solid understanding of reCaptcha v3 and mastering tools like CapSolver can significantly elevate your online navigation skills. Join us as we delve deeper into this intriguing subject, arming you with invaluable expertise for your digital odyssey.

reCAPTCHA

29-Aug-2023

How to find the callback function of reCaptcha
How to find the callback function of reCaptcha

Finding the callback of a reCAPTCHA involves identifying the JavaScript function that's executed after the reCAPTCHA is successfully solved. Here's a brief preview of the steps you might take

reCAPTCHA

28-Aug-2023