Index

Download the api client based example codes:

reCAPTCHA v3 API support

What are "Recaptcha V3" challenges?

reCAPTCHA v3 is a new invisible security measure introduced by Google. It adds a captcha without forcing the user to solve any challenge. Uses a concept called “actions” to identify real traffic from bot traffic.

Our service now supports Google reCAPTCHA v3. This API is quite similar to the tokens(reCAPTCHA v2) API. Only 2 new parameters were added, one for the action and other for the minimal score.

reCAPTCHA v3 returns a score from each user, that evaluate if user is a bot or human. Then the website uses the score value that could range from 0 to 1 to decide if will accept or not the requests. Lower scores near to 0 are identified as bot.

The action parameter at reCAPTCHA v3 is an additional data used to separate different captcha validations like for example login, register, sales, etc.

Pricing

For the time being, price is $2.89/1K reCAPTCHA v3 challenges correctly solved. You will not be billed for captchas reported as incorrectly solved. Note that this pricing applies to new reCAPTCHA v3 only, so only customers using this specific API will be charged said rate.

reCAPTCHA v3 API FAQ:

What is action in recaptcha V3?

Is a new parameter that allows processing user actions on the website differently.

To find this we need to inspect the javascript code of the website looking for call of grecaptcha.execute function. Example:


grecaptcha.execute("6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_f", {action: something})
    

Sometimes it`s really hard to find it and we need to look through all javascript files. We may also try to find the value of action parameter inside ___grecaptcha_cfg configuration object. Also we can call grecaptcha.execute and inspect javascript code. The API will use "verify" default value it if we won`t provide action in our request.

What is min-score in reCAPTCHA v3 API?

The minimal score needed for the captcha resolution. We recommend using the 0.3 min-score value, scores highers than 0.3 are hard to get.

What are the POST parameters for the reCAPTCHA v3 API?
  • username: Your DBC account username
  • password: Your DBC account password
  • type=5: Type 5 specifies this is reCAPTCHA v3 API
  • token_params=json(payload): the data to access the recaptcha challenge
  • json payload structure:
    • proxy: your proxy url and credentials (if any).Examples:
    • proxytype: your proxy connection protocol. For supported proxy types refer to Which proxy types are supported?. Example:
      • HTTP
    • googlekey: the google recaptcha site key of the website with the recaptcha. For more details about the site key refer to What is a recaptcha site key? Example:
      • 6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-
    • pageurl: the url of the page with the recaptcha challenges. This url has to include the path in which the recaptcha is loaded. Example: if the recaptcha you want to solve is in http://test.com/path1, pageurl has to be http://test.com/path1 and not http://test.com.
    • action: The action name.
    • min_score: The minimal score, usually 0.3
    The proxy parameter is optional, but we strongly recommend to use one to prevent rejection by the provided page due to inconsistencies between the IP that solved the captcha (ours if no proxy is provided) and the IP that submitted the solution for verification (yours).
    Note: if proxy is provided, proxytype is a required parameter.

    Full example of token_params:

    
    {
      "proxy": "http://127.0.0.1:3128",
      "proxytype": "HTTP",
      "googlekey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
      "pageurl": "http://test.com/path_with_recaptcha",
      "action": "example/action",
      "min_score": 0.3
    }
                
What`s the response from reCAPTCHA v3 API?

The response has the same structure as regular captcha. Refer to Polling for uploaded CAPTCHA status for details about the response. The solution will come in the text key of the response. It`s valid for one use and has a 1 minute lifespan.

Curl usage code examples for reCAPTCHA v3 API:

1) Send your payload:

Please note we are using type="5" for reCAPTCHA v3 API.

    curl --header 'Expect: ' -F username=your_username_here \
                             -F password=your_password_here \
                             -F type='5' \
                             -F token_params='{"proxy": "http://user:[email protected]:1234",
                                               "proxytype": "HTTP",
                                               "googlekey": "6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_b",
                                               "pageurl": "http://google.com",
                                               "action": "example/action",
                                               "min_score": 0.3}' \
                             http://api.dbcapi.me/api/captcha
        

2) Pulling captcha : take the given CAPTCHA_ID and make a request like this:
curl -H "Accept: application/json" http://api.dbcapi.me/api/captcha/CAPTCHA_ID
Result is a json-string where the field "text" includes the respective solution:
'{"status": 0, "captcha": 2911096,
        "is_correct": true, "text": "textSolution"}'

Using reCAPTCHA v3 API with api clients:


    # recaptcha_v3
    import deathbycaptcha
    import json

    # Put your DBC account username and password here.
    username = "username"
    password = "password"

    # you can use authtoken instead of user/password combination
    # activate and get the authtoken from DBC users panel
    authtoken = "authtoken"

    # to use socket client
    # client = deathbycaptcha.SocketClient(username, password)

    # to use authtoken
    # client = deathbycaptcha.SocketClient(username, password, authtoken)

    client = deathbycaptcha.HttpClient(username, password)

    # Put the proxy and recaptcha_v3 data
    # recaptcha_v3 requires 'action' that is the action that triggers
    # recaptcha_v3 validation
    # if 'action' isn't provided we use the default value "verify"
    # also you need to provide 'min_score', a number from 0.1 to 0.9,
    # this is the minimum score acceptable from recaptchaV3

    Captcha_dict = {
        'proxy': 'http://user:[email protected]:1234',
        'proxytype': 'HTTP',
        'googlekey': '6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_f',
        'pageurl': 'http://google.com',
        'action': "example/action",
        'min_score': 0.3}

    # Create a json string
    json_Captcha = json.dumps(Captcha_dict)

    try:
        balance = client.get_balance()
        print(balance)

        # Put your CAPTCHA type and Json payload here:
        captcha = client.decode(type=5, token_params=json_Captcha)
        if captcha:
            # The CAPTCHA was solved; captcha["captcha"] item holds its
            # numeric ID, and captcha["text"] item it's a list of "coordinates".
            print("CAPTCHA %s solved: %s" % (captcha["captcha"], captcha["text"]))

            if '':  # check if the CAPTCHA was incorrectly solved
                client.report(captcha["captcha"])
    except deathbycaptcha.AccessDeniedException:
        # Access to DBC API denied, check your credentials and/or balance
        print("error: Access to DBC API denied, check your credentials and/or balance")
      

New Recaptcha v2 by Token API support

What are "Recaptcha V2" challenges?

They`re new reCAPTCHA challenges that typically require the user to identify and click on certain images. They`re not to be confused with traditional word/number reCAPTCHAs (those have no images).

For your convenience, we implemented support for New Recaptcha by Token API. If your software works with it, and supports minimal configuration, you should be able to decode captchas using Death By Captcha in no time.

  • Token Image API: Provided a site url and site key, the API returns a token that you will use to submit the form in the page with the reCaptcha challenge.

We also support solving token captchas through our 2captcha api. Check it out!

Pricing

For the time being, price is $2.89/1K Token reCAPTCHA challenges correctly solved. You will not be billed for Token Images reported as incorrectly solved. Note that this pricing applies to new Token reCAPTCHA images only, so only customers using this specific API will be charged said rate.

Token Image API FAQ:

What`s the Token Image API URL?

To use the Token Image API you will have to send a HTTP POST Request to http://api.dbcapi.me/api/captcha

What are the POST parameters for the Token image API?

  • username: Your DBC account username
  • password: Your DBC account password
  • type=4: Type 4 specifies this is a New Recaptcha Token Image API
  • token_params=json(payload): the data to access the recaptcha challenge
  • json payload structure:
    • proxy: your proxy url and credentials (if any).Examples:
    • proxytype: your proxy connection protocol. For supported proxy types refer to Which proxy types are supported?. Example:
      • HTTP
    • googlekey: the google recaptcha site key of the website with the recaptcha. For more details about the site key refer to What is a recaptcha site key?. Example:
      • 6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-
    • pageurl: the url of the page with the recaptcha challenges. This url has to include the path in which the recaptcha is loaded. Example: if the recaptcha you want to solve is in http://test.com/path1, pageurl has to be http://test.com/path1 and not http://test.com.

    • data-s: This parameter is only required for solve the google search tokens, the ones visible, while google search trigger the robot protection. Use the data-s value inside the google search response html. For regulars tokens don`t use this parameter.
    The proxy parameter is optional, but we strongly recommend to use one to prevent rejection by the provided page due to inconsistencies between the IP that solved the captcha (ours if no proxy is provided) and the IP that submitted the solution for verification (yours).
    Note: if proxy is provided, proxytype is a required parameter.

    Full example of token_params:

    
    {
      "proxy": "http://127.0.0.1:3128",
      "proxytype": "HTTP",
      "googlekey": "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-",
      "pageurl": "http://test.com/path_with_recaptcha"
    }
                

Can`t solve recaptcha v2 at google search with tokens api ?

Google search captchas, the ones visible, while google search trigger the robot protection. Starting from past end of May 2020, now require a new parameter data-s for solve those captchas. In the google search recaptcha html code locate the data-s value and send it as part of token_params. Note that data-s value can be loaded only once, avoid load js code at google recaptcha form. The data-s parameter is unique for each captcha.

Example of token_params for google search captchas:


{
  "googlekey": "6Le-wvkSA...",
  "pageurl": "...",
  "data-s": "IUdfh4rh0sd..."
}
            

What`s the response from the Token image API?

The token image API response has the same structure as regular captcha`s response. Refer to Polling for uploaded CAPTCHA status for details about the response. The token will come in the text key of the response. It`s valid for one use and has a 2 minute lifespan. It will be a string like the following:


       "03AOPBWq_RPO2vLzyk0h8gH0cA2X4v3tpYCPZR6Y4yxKy1s3Eo7CHZRQntxrd
        saD2H0e6S3547xi1FlqJB4rob46J0-wfZMj6YpyVa0WGCfpWzBWcLn7tO_EYs
        vEC_3kfLNINWa5LnKrnJTDXTOz-JuCKvEXx0EQqzb0OU4z2np4uyu79lc_Ndv
        L0IRFc3Cslu6UFV04CIfqXJBWCE5MY0Ag918r14b43ZdpwHSaVVrUqzCQMCyb
        cGq0yxLQf9eSexFiAWmcWLI5nVNA81meTXhQlyCn5bbbI2IMSEErDqceZjf1m
        X3M67BhIb4"

To learn how to use the token to solve a recaptcha, refer to How to use token to solve a recaptcha?

Which proxy types are supported?

Currently, only HTTP proxies are supported. Support for other types will be added in the future.

What is a recaptcha site key?

This is a unique identifier Google assigns to each website that uses the recaptcha service. To find the site key, follow these steps:

  1. Go to the website whose recaptcha you`re trying to bypass.
  2. Open your browser`s developers console by doing one of the following:
    • Use your browser`s keyboard shortcut (Refer to this link for help)
    • Right click anywhere on the page, click the "Inspect" or "Inspect element" option and click on the "Console" tab of the window the opened up.
    • If none of the above work, google how to open your browser`s console.
  3. Paste this JavaScript instruction on the developers console: document.getElementsByClassName('g-recaptcha')[0].getAttribute("data-sitekey");
  4. Press Enter. The result should be a string like the one used as example in the googlekey section of the What are the POST parameters for the Token image API? question. This string is the site key.

Cannot find data-sitekey, what can I do?

We can find the data-sitekey inspecting the element or viewing the page source code and search for the name. data-sitekey localization example
But there is some cases when this data-sitekey isn`t that obvious, in that case try searching for similar words or some strings that starts with 6L, there is no specific method to find the sitekey, in the case of cryptic/hard-to-get data-sitekey we need to make use of our skills to get it.

How to use token to solve a recaptcha?

There are three ways in which the token can be used:

The first one is to make a POST request to the URL in the form`s action attribute with the token set as the value of the textarea field whose id is g-recaptcha-response. The other fields can be filled as you desire. This is the recommended method to consume the token given that it does not require browser emulation nor DOM manipulation.

The second way is to manipulate the DOM. If you are developing a script to solve recaptchas, check if the programming language or framework you are using has a library to manipulate the DOM or execute JavaScript instructions. The following steps need to be completed to successfully use the token:

  1. Put the token as the inner html of the element with id "g-recaptcha-response".
    • To do this with JavaScript, run: document.getElementById(`g-recaptcha-response`).innerHTML=TOKEN; where TOKEN is the string returned in the text key of the API`s response. Place double quotes (") before and after the token if the returned string does not already have them.
  2. Submit the form or complete the action that requires the recaptcha to be solved.
    • To achieve this with Javascript, execute: document.getElementById(`FORM_ID`).submit(); where FORM_ID is the id of the form that wants to be submitted.
    • sometimes is not enough only submitting the form to solve the recaptcha, on these cases we need to copy the result token from the API into the g-recaptcha-response element, being careful to only coping the exact result token and avoid using spaces and other characters such as quotes or double quotes. After we copy the result token into the element we need to activate the widget event to the captcha be marked as solved.
    • successfully solved reCAPTCHA
    • Each site have a unique way to implement the recaptcha, its recommended to do the process for a new site manually before try to automate it, after we are sure all steps to solve the recaptcha we can use our tools to automate the process. We take into consideration that sometimes the submit form activates the recaptcha, sometimes we don`t have a submit form or in other cases is the callback of the captcha that activates the event to access the resources.
The last method of using the token is by manually posting the form. First, follow steps 1 and 2 of the guide on how to find the site key specified in What is a recaptcha site key?. After that, copy the JavaScript instruction of the step 1 described above, paste it in the developers console, press enter and submit the form manually.

Note: methods 2 and 3 should only be used for testing purposes as they are far slower and more resource intensive than the first one.

What is the recaptcha callback?

Some sites can configure reCAPTCHA to give a callback on successful validation and avoid the use of the submit form, using the data-callback attribute on the g-recaptcha tag or via the `callback` parameter if using explicit rendering.

The callback function is often defined in data-callback parameter of reCaptcha, for example:


        data-callback="myFunction";
      
Or in some cases it`s defined as callback parameter of grecaptcha.render function, for example:


        grecaptcha.render('example', {
          'sitekey' : 'site-key',
          'callback' : myFunction
        });
      
Finally all we have to do is to call that function:

        myFunction();
      
I am using the token i get from the API why the recaptcha is not solving?

All sites implement the recaptcha on its own way, this mean we need to analyze each site recaptcha implementation before try to use the result token, once we are sure how this particular site works, to do this we solve the reCAPTCHA challenge as a normal user and gain insight of the implementation, then we can start trying using the result token from the API manually and after we are sure how is the procedure, then we can automate it. To be sure how the recaptcha works we can have a look of the reCAPTCHA v2 documentation.

How to verify that my proxy is being used to solve a captcha?

Go to Previous Submissions after uploading a captcha and check the "Proxy" and "Provided Proxy Status" fields of the uploaded captcha. If your proxy was used to solve the captcha, the "Proxy" field`s value will be your proxy`s IP address and the "Provided Proxy Status" will be "Good". If it was not used, "Proxy" will have "DBC Proxy" as value (meaning that captcha was solved using one of our proxies) and "Provided Proxy Status" field`s value will be "Bad or not provided". Example screenshot:

Example screenshot of Provided Proxy Status in Previous Submissions section

Usage code examples for TOKEN IMAGE API:

1) Send your payload:

Please note we are using type="4" for TOKEN IMAGE API.

    curl --header 'Expect: ' -F username=your_username_here \
                             -F password=your_password_here \
                             -F type='4' \
                             -F token_params='{"proxy": "http://user:[email protected]:1234",
                                               "proxytype": "HTTP",
                                               "googlekey": "6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_b",
                                               "pageurl": "http://google.com"}' \
                             http://api.dbcapi.me/api/captcha
        

2) Pulling captcha : take the given CAPTCHA_ID and make a request like this:
curl -H "Accept: application/json" http://api.dbcapi.me/api/captcha/CAPTCHA_ID
Result is a json-string where the field "text" includes the respective solution:
'{"status": 0, "captcha": 2911096,
        "is_correct": true, "text": "textToken"}'

Using TOKEN IMAGE API with api clients:


    /**
     * Death by Captcha PHP API recaptcha_v2 usage example
     *
     * @package DBCAPI
     * @subpackage PHP
     */

    /**
     * DBC API clients
     */
    require_once '../deathbycaptcha.php';

    $username = "username";  // DBC account username
    $password = "password";  // DBC account password
    $token_from_panel = "your-token-from-panel";  // DBC account authtoken

    // Use DeathByCaptcha_SocketClient() class if you want to use SOCKET API.
    $client = new DeathByCaptcha_HttpClient($username, $password);
    $client->is_verbose = true;

    // To use token the first parameter must be authtoken.
    // $client = new DeathByCaptcha_HttpClient("authtoken", $token_from_panel);

    echo "Your balance is {$client->balance} US cents\n";

    // To use recaptcha_Token
    // Set the proxy and reCaptcha token data
    $data = array(
         'proxy' => 'http://user:[email protected]:1234',
         'proxytype' => 'HTTP',
        'googlekey' => '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',
        'pageurl' => 'https://www.google.com/recaptcha/api2/demo'
    );
    //Create a json string
    $json = json_encode($data);

    //Put the type and the json payload
    $extra = [
        'type' => 4,
        'token_params' => $json,
    ];

    // Put null the first parameter and add the extra payload
    if ($captcha = $client->decode(null, $extra)) {
        echo "CAPTCHA {$captcha['captcha']} uploaded\n";

        sleep(DeathByCaptcha_Client::DEFAULT_TIMEOUT);

        // Poll for CAPTCHA indexes:
        if ($text = $client->get_text($captcha['captcha'])) {
            echo "CAPTCHA {$captcha['captcha']} solved: {$text}\n";

            // Report an incorrectly solved CAPTCHA.
            // Make sure the CAPTCHA was in fact incorrectly solved!
            //$client->report($captcha['captcha']);
        }
    }
        

    import deathbycaptcha
    import json

    # Put your DBC account username and password here.
    username = "username"
    password = "password"

    # you can use authtoken instead of user/password combination
    # activate and get the authtoken from DBC users panel
    authtoken = "authtoken"

    # to use socket client
    # client = deathbycaptcha.SocketClient(username, password)

    # to use authtoken
    # client = deathbycaptcha.SocketClient(username, password, authtoken)

    client = deathbycaptcha.HttpClient(username, username)

    # Put the proxy and recaptcha_v2 data
    Captcha_dict = {
        'proxy': 'http://user:[email protected]:1234',
        'proxytype': 'HTTP',
        'googlekey': '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',
        'pageurl': 'https://www.google.com/recaptcha/api2/demo'}
    # Create a json string
    json_Captcha = json.dumps(Captcha_dict)

    try:
        balance = client.get_balance()
        print(balance)

        # Put your CAPTCHA type and Json payload here:
        captcha = client.decode(type=4, token_params=json_Captcha)
        if captcha:
            # The CAPTCHA was solved; captcha["captcha"] item holds its
            # numeric ID, and captcha["text"] item it's a text token".
            print("CAPTCHA %s solved: %s" % (captcha["captcha"], captcha["text"]))

            if '':  # check if the CAPTCHA was incorrectly solved
                client.report(captcha["captcha"])
    except deathbycaptcha.AccessDeniedException:
        # Access to DBC API denied, check your credentials and/or balance
        print("error: Access to DBC API denied, check your credentials and/or balance")


        

import com.DeathByCaptcha.AccessDeniedException;
import com.DeathByCaptcha.Client;
import com.DeathByCaptcha.HttpClient;
import com.DeathByCaptcha.SocketClient;
import com.DeathByCaptcha.Captcha;
import org.json.JSONObject;

import java.io.IOException;

class ExampleRecaptchaV2 {
    public static void main(String[] args)
            throws Exception {

        // Put your DBC username & password or authtoken here:
        String username = "your_username_here";
        String password = "your_password_here";
        String authtoken = "your_authtoken_here";

        /* Death By Captcha Socket Client
           Client client = (Client) (new SocketClient(username, password));
           Death By Captcha http Client */
        Client client = (Client) (new HttpClient(username, password));
        client.isVerbose = true;

        /* Using authtoken
           Client client = (Client) new HttpClient(authtoken); */

        try {
            try {
                System.out.println("Your balance is " + client.getBalance() + " US cents");
            } catch (IOException e) {
                System.out.println("Failed fetching balance: " + e.toString());
                return;
            }

            Captcha captcha = null;
            try {
                // Proxy and reCAPTCHA v2 token data
                String proxy = "http://user:[email protected]:1234";
                String proxytype = "http";
                String googlekey = "6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_f";
                String pageurl = "http://google.com";
                /* Upload a reCAPTCHA v2 and poll for its status with 120 seconds timeout.
                   Put the token params and timeout (in seconds)
                   0 or nothing for the default timeout value. */
                captcha = client.decode(proxy, proxytype, googlekey, pageurl);

                //other method is to send a json with the parameters
                /*
                JSONObject json_params = new JSONObject();
                json_params.put("proxy", proxy);
                json_params.put("proxytype", proxytype);
                json_params.put("googlekey", googlekey);
                json_params.put("pageurl", pageurl);
                captcha = client.decode(4, json_params);
                */
            } catch (IOException e) {
                System.out.println("Failed uploading CAPTCHA");
                return;
            }

            if (null != captcha) {
                System.out.println("CAPTCHA " + captcha.id + " solved: " + captcha.text);

                // Report incorrectly solved CAPTCHA if necessary.
                // Make sure you've checked if the CAPTCHA was in fact incorrectly
                // solved, or else you might get banned as abuser.
                /*try {
                    if (client.report(captcha)) {
                        System.out.println("Reported as incorrectly solved");
                    } else {
                        System.out.println("Failed reporting incorrectly solved CAPTCHA");
                    }
                } catch (IOException e) {
                    System.out.println("Failed reporting incorrectly solved CAPTCHA: " + e.toString());
                }*/
            } else {
                System.out.println("Failed solving CAPTCHA");
            }
        } catch (com.DeathByCaptcha.Exception e) {
            System.out.println(e);
        }


    }
}
        

using System;
using System.Collections;
using DeathByCaptcha;

namespace DBC_Examples.examples
{
    public class RecaptchaV2Example
    {
        public void Main()
        {
            // Put your DeathByCaptcha account username and password here.
            string username = "your username";
            string password = "your password";
            // string token_from_panel = "your-token-from-panel";

            /* Death By Captcha Socket Client
               Client client = (Client) new SocketClient(username, password);
               Death By Captcha http Client */
            Client client = (Client) new HttpClient(username, password);

            /* To use token authentication the first parameter must be "authtoken".
            Client client = (Client) new HttpClient("authtoken", token_from_panel); */

            // Put your Proxy credentials and type here
            string proxy = "http://user:[email protected]:1234";
            string proxyType = "HTTP";
            string googlekey = "6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_b";
            string pageurl = "http://google.com";

            string tokenParams = "{\"proxy\": \"" + proxy + "\"," +
                                 "\"proxytype\": \"" + proxyType + "\"," +
                                 "\"googlekey\": \"" + googlekey + "\"," +
                                 "\"pageurl\": \"" + pageurl + "\"}";

            try
            {
                double balance = client.GetBalance();

                /* Upload a CAPTCHA and poll for its status.  Put the Token CAPTCHA
                   Json payload, CAPTCHA type and desired solving timeout (in seconds)
                   here. If solved, you'll receive a DeathByCaptcha.Captcha object. */
                Captcha captcha = client.Decode(Client.DefaultTimeout,
                    new Hashtable()
                    {
                        {"type", 4},
                        {"token_params", tokenParams}
                    });

                if (null != captcha)
                {
                    /* The CAPTCHA was solved; captcha.Id property holds
                    its numeric ID, and captcha.Text holds its text. */
                    Console.WriteLine("CAPTCHA {0} solved: {1}", captcha.Id,
                        captcha.Text);

//                  if ( /* check if the CAPTCHA was incorrectly solved */)
//                  {
//                      client.Report(captcha);
//                  }
                }
            }
            catch (AccessDeniedException e)
            {
                /* Access to DBC API denied, check your credentials and/or balance */
                Console.WriteLine("<<< catch : " + e.ToString());
            }
        }
    }
}
         

Imports DeathByCaptcha

Public Class RecaptchaV2
    Sub Main(args As String())

        ' Put your DBC username & password or authtoken here:
        Dim username = "username"
        Dim password = "password"
        Dim token_from_panel = "your-token-from-panel"

        ' DBC Socket API client
        ' Dim client As New SocketClient(username, password)
        ' DBC HTTP API client
        Dim client As New HttpClient(username, password)

        ' To use token auth the first parameter must be "authtoken"
        ' Dim client As New HttpClient("authtoken", token_from_panel)

        ' Proxy and recaptcha_v2 token data
        Dim proxy = "http://user:[email protected]:1234"
        Dim proxyType = "HTTP"
        Dim googlekey = "6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_b"
        Dim pageurl = "http://google.com"

        Console.WriteLine(String.Format("Your balance is {0,2:f} US cents",
                                        client.Balance))

        ' Create a JSON with the extra data
        Dim tokenParams = "{""proxy"": """ + proxy + """," +
                          """proxytype"": """ + proxyType + """," +
                          """googlekey"": """ + googlekey + """," +
                          """pageurl"": """ + pageurl + """}"

        '  Create the payload with the type and the extra data
        Dim extraData As New Hashtable()
        extraData.Add("type", 4)
        extraData.Add("token_params", tokenParams)

        ' Upload a CAPTCHA and poll for its status.  Put the Token CAPTCHA
        ' Json payload, CAPTCHA type and desired solving timeout (in seconds)
        ' here. If solved, you'll receive a DeathByCaptcha.Captcha object.
        Dim captcha As Captcha = client.Decode(DeathByCaptcha.Client.DefaultTimeout, extraData)
        If captcha IsNot Nothing Then
            Console.WriteLine(String.Format("CAPTCHA {0:d} solved: {1}", captcha.Id,
                                            captcha.Text))

            ' Report an incorrectly solved CAPTCHA.
            ' Make sure the CAPTCHA was in fact incorrectly solved, do not
            ' just report it at random, or you might be banned as abuser.
            ' If client.Report(captcha) Then
            '    Console.WriteLine("Reported as incorrectly solved")
            ' Else
            '    Console.WriteLine("Failed reporting as incorrectly solved")
            ' End If
        End If
    End Sub
End Class


' this script uses DeCaptcher API, to use this API first we need to opt-in our user
' in the following URL http://deathbycaptcha.com/user/api/decaptcher
' Is recomended to read the FAQ in that page

' this script can use authentication token instead of username/password combination
' to use this API with authentication token, first we need enable token authentication
' on users panel authentication on users panel when using authentication token the username
' must be the keyword authtoken and the password is the authentication token from users panel

VERSION BUILD=844
' we need to set a timeout to wait for the captcha solution
SET !TIMEOUT_PAGE 200
' the script go to this URL to use the API
URL GOTO=http://api.dbcapi.me/decaptcher?function=token&print_format=html
' Set our username, need to replace {{}} with username, ex.
' TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
'                             ATTR=NAME:username CONTENT=myusername
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
                                ATTR=NAME:username CONTENT={{username}}
' replace password with our password, ex.
' TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
'                           ATTR=NAME:password CONTENT=mycurrentpassword
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
                            ATTR=NAME:password CONTENT={{password}}
' here we set our proxy, ex.
' TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
'    ATTR=NAME:proxy CONTENT=https://proxy_username:proxy_password@proxy_url:proxy_port
' we need to use this proxy format https://proxy_username:proxy_password@proxy_url:proxy_port
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
                                            ATTR=NAME:proxy CONTENT={{proxy}}
' here we set the proxy type ex.
' TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher
'                                           ATTR=NAME:proxytype CONTENT=http
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher ATTR=NAME:proxytype
                                                                        CONTENT={{proxy_type}}
' here we set the googlekey
' for information about googlekey, look here
' http://deathbycaptcha.com/user/api/newtokenrecaptcha#what-site-key
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher ATTR=NAME:googlekey
                                                                CONTENT={{google_site_key}}
' here we set the site that have the token recaptcha challenge, ex.
' TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher ATTR=NAME:pageurl
                                                        CONTENT=https://www.site.com/login
TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:http://api.dbcapi.me/decaptcher ATTR=NAME:pageurl
                                                                CONTENT={{challenge_site}}
' we submit the captcha to solve
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:http://api.dbcapi.me/decaptcher ATTR=VALUE:Send

' and we get our result
TAG POS=6 TYPE=TD ATTR=* EXTRACT=TXT
SET !VAR1 {{!EXTRACT}}


/*
* Death by Captcha Node.js API recaptcha_v2 token image usage example
*/

const dbc = require('../deathbycaptcha');

const username = 'username';     // DBC account username
const password = 'password';     // DBC account password
const token_from_panel = 'your-token-from-panel';   // DBC account authtoken

// Proxy and recaptcha_v2 token data
const token_params = JSON.stringify({
    'proxy': 'http://username:[email protected]:3128',
    'proxytype': 'HTTP',
    'googlekey': '6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-',
    'pageurl': 'https://www.google.com/recaptcha/api2/demo'
});

// Death By Captcha Socket Client
// const client = new dbc.SocketClient(username, password);
// Death By Captcha http Client
const client = new dbc.HttpClient(username, password);

// To use token authentication the first parameter must be "authtoken"
// const client = new dbc.HttpClient("authtoken", token_from_panel);

// Get user balance
client.get_balance((balance) => {
    console.log(balance);
});

// Solve captcha with type 4 & token_params extra arguments
client.decode({extra: {type: 4, token_params: token_params}}, (captcha) => {

    if (captcha) {
        console.log('Captcha ' + captcha['captcha'] + ' solved: ' + captcha['text']);

        /*
        * Report an incorrectly solved CAPTCHA.
        * Make sure the CAPTCHA was in fact incorrectly solved!
        * client.report(captcha['captcha'], (result) => {
        *   console.log('Report status: ' + result);
        * });
        */
    }

});

        

Status: OK

Servers are fully operational with faster than average response time.
  • Average solving time
  • 5 seconds - Normal CAPTCHAs (1 min. ago)
  • 47 seconds - reCAPTCHA V2, V3, etc (1 min. ago)
  • 20 seconds - hCAPTCHA & others (1 min. ago)
Chrome and Firefox logos
Browser extensions available

Updates

  1. Nov 14: RESOLVED - Today we experienced API instability between 18:00hrs & 19:00hrs (GMT-4). The main issue was resolved, so CAPTCHA solving is working as usual, however, there might be some stats anomalies that will shortly be fixed. In the meantime, if you need assistance, contact us at https://deathbycaptcha.com/contact and we'll gladly assist you. We apologize for any inconvenience and appreciate your patience and understanding.
  2. Sep 27: LIMITED WEEK-END PROMOTION! 20% OFF ON 2CHECKOUT PACKAGES IF YOU ORDER BETWEEN SEPT 28 & 29 (GMT-4). Get your CAPTCHAs at https://deathbycaptcha.com/user-pay and then contact us at https://deathbycaptcha.com/contact with your order's detail to claim your freebies!
  3. Sep 13: We experienced a brief login issue today, which has now been resolved. Thank you for your patience and understanding!

  4. Previous updates…

Support

Our system is designed to be completely user-friendly and easy-to-use. Should you have any trouble with it, simply email us at DBC technical support emailcom, and a support agent will get back to you as soon as possible.

Live Support

Available Monday to Friday (10am to 4pm EST) Live support image. Link to live support page