VK CAPTCHA

VK CAPTCHA

We offer two methods to solve this type of captcha - token-based and image-based.

Token-based method to bypass VK CAPTCHA

The VKCaptchaTask method requires redirectUri or sessionToken parameters, as well as proxy and userAgent. The value of the redirectUri parameter can be found in the response to requests to the VK API that return captchas. The sessionToken value is part of redirectUri.

Attention, you must monitor the quality of the proxy used.

Attention, you should provide your User-Agent that was used to interact with target website, it will be used to load and solve the captcha. Always use User-Agents of modern browsers.

VKCaptchaTask task type specification

Property Type Required Description
type String Yes Task type:
VKCaptchaTask
redirectUri String Yes The URL that is returned on requests to the captcha API.
Your request must contain redirectUri or sessionToken
sessionToken String Yes session_token value from redirectUri.
Your request must contain redirectUri or sessionToken
userAgent String Yes User-Agent of your browser will be used to load the captcha
proxyType String Yes Proxy type:
http
https
socks5
proxyAddress String Yes Proxy IP address or hostname
proxyPort Integer Yes Proxy port
proxyLogin String No Login for basic authentication on the proxy
proxyPassword String No Password for basic authentication on the proxy

Request examples

Method: createTask
API endpoint: https://api.2captcha.com/createTask

VKCaptchaTask

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "VKCaptchaTask",
        "redirectUri": "https://id.vk.com/not_robot_captcha?domain=vk.com&session_token=eyJ....HGsc5B4LyvjA&variant=popup&blank=1",
        "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36",
        "proxyType": "http",
        "proxyAddress": "1.2.3.4",
        "proxyPort": "8080",
        "proxyLogin": "user23",
        "proxyPassword": "p4$w0rd"        
    }
}

The query will return the ID of your captcha, which should be used to get the result.

Response example

Method: getTaskResult
API endpoint: https://api.2captcha.com/getTaskResult

{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "token":"eyJhbG...kyAWZSNoJPw"
    },
    "cost": "0.00145",
    "ip": "1.2.3.4",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1
}

Use the token to interact with the target website.

Image-based method to bypass VK CAPTCHA

  • VKCaptchaImageTask - we use the image (image in base64 format) and steps parameters.
    You can get both values from the response to the request https://api.vk.com/method/captchaNotRobot.getContent?v={API_VER} when loading the captcha widget on the page.

VKCaptchaTask task type specification

Property Type Required Description
type String Yes Task type:
VKCaptchaTask
image String Yes Image of the captcha task in base64 format
steps String Yes The value of the steps parameter from the response
to the request https://api.vk.com/method/captchaNotRobot.getContent?v={API_VER} when loading the captcha widget on the page

Request examples

Method: createTask
API endpoint: https://api.2captcha.com/createTask

VKCaptchaImageTask

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type":"VKCaptchaImageTask",
        "image":"/9j/4AAQSkZJRg......",
        "steps":[5,19,14,14,6,4,8,9,23,23,14,23,3,13,16,8,2,4,6,16,1,1,3,12,23,18,12,24,17,7,6,22,2,4,0,22,3,18,11,5,4,5,6,14,22,21,6,10,0,3,14,18,19,2,24,0,3,23,9,21,5,24,21,0,4,15,14,21,8,5,17,19,12,19,15,17,21,11,8,4,15,0,18,16,19,4,19,20,21,22,16,10,20,12,19,5,23,24,8]
    }
}

The query will return the ID of your captcha, which should be used to get the result.

Response example

Method: getTaskResult
API endpoint: https://api.2captcha.com/getTaskResult

{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "best_step":46,
        "preview":"/9j/4AA......",
        "solution":[19,14,14,6,4,8,9,23,23,14,23,3,13,16,8,2,4,6,16,1,1,3,12,23,18,12,24,17,7,6,22,2,4,0,22,3,18,11,5,4,5,6,14,22,21,6,10,0,3,14,18,19,2,24,0,3,23,9,21,5,24,21,0,4,15,14,21,8,5,17,19,12,19,15,17,21,11,8,4,15,0,18,16,19,4,19,20,21,22,16,10,20],
        "answer":"eyJ2YW...yMF19"
    },
    "cost": "0.00145",
    "ip": "1.2.3.4",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1
}

best_step - the number of steps you need to pass to solve the captcha, you can use this value to move the slider
solution - the list of steps passed to solve the captcha
answer - the solution in proper API format, use it to interact with the target website API
preview - is the base64 image showing the result of performing steps from the solution