How to bypass VK captcha

This week, we added a solution for VK Captcha, which our users have been requesting for a while. The CAPTCHA looks like this:

or like this:

This is a simple and a more complex version of the VK Captcha.

Depending on the implementation, you will need to use one of two methods to solve this CAPTCHA: with a token or with an image.

How to Find Parameters for VK CAPTCHA (Token Method):

You will need the following parameters: redirect_uri or session_token, as well as proxy and userAgent.
Open the developer tools in your browser and trigger the CAPTCHA, for example, during the login attempt. In response, you will get:

From this data, find the necessary redirect_uri. The session_token will also be in the same line. We only need one of these parameters.

How to Send a Request to 2Captcha:

You can read more about this method in our documentation.
Let’s go through using API v1. You need to send an HTTPS request to our endpoint:
https://2captcha.com/in.php?

The required data in the request (using session_token as an example):

{
  "method": "vkcaptcha",
  "key": "API_key",
  "session_token": "session_token",
  "proxy": "proxy",
  "proxytype": "HTTPS",
  "userAgent": "ua"
}

Details about the parameters:

  • API_key – Your API key, which can be found on the homepage of your 2Captcha dashboard.
  • proxy – Proxy information in the format login:password@IP:port
  • ua – Here, you insert the user agent you need.

After this, you will receive the captcha ID. Wait about 5-7 seconds and then request the solution from the next endpoint:
https://2captcha.com/res.php?

with the following data:

{
  "key": "API_key",
  "action": "get",
  "id": "Captcha ID"
}

In response, you will receive a set of characters representing the captcha solution or an error message.

We recommend using API v2 for sending CAPTCHA solving requests, as it uses JSON methods for sending data: https://2captcha.com/api-docs/vk-captcha

How to Use the VK CAPTCHA Token

How to Use the VK CAPTCHA Token

As shown in the screenshot, the token is sent during the authorization process on the site as part of the request payload. Send this request with the obtained solution (token). Keep in mind that the token has a validity period of about three minutes.

Solving VK CAPTCHA Using Automatic Browsers and Images

Now, let’s look at another case. If you prefer solving the CAPTCHA like a human, using an automated browser.

First, you need to click on the checkbox. After that, you will receive an image CAPTCHA – a set of a kaleidoscope of images. In this case, to solve it, you need to send us the initial image as a base64 file. We also need the sequence of image swaps, or steps, which is uploaded with the CAPTCHA. We will arrange the image correctly on our side, and then send you the sequence with the correct steps.

To solve the CAPTCHA, you only need to send 2 required parameters: image (in base64 format) and steps. Both of these values can be easily found in the response to the request https://api.vk.com/method/captchaNotRobot.getContent?v={API_VER} when the CAPTCHA widget loads on the page.

Data for solving the VK captcha using the image method for API V1:

{
  "method": "vkimage",
  "key": "API_key",
  "body": "img_base64",
  "steps": "steps"
}

You can use the solution in various ways, do as you find convenient.

For example, in this screenshot, you can see that the step number in order can be found on the page in a specific element. By changing the argument value, you can immediately set the slider to the correct position.

Conclusion

We wish you the best of luck in writing software using our service, and if you have any questions, our support team is always happy to help, contact us.