Menggunakan otentikasi token

Halaman ini untuk pengguna yang ingin menggunakan otentikasi token pada Death By Captcha API.

Token Otentikasi FAQ

Mengapa menggunakan otentikasi token?

Otentikasi berbasis token memungkinkan pengguna untuk mempertahankan nama pengguna dan kata sandi yang lebih aman.

Mengapa token lebih baik dari kata sandi?

Kata sandi tradisional memiliki satu kelemahan besar: mereka dihasilkan manusia. Kata sandi buatan manusia cenderung sangat lemah dan mudah dipecahkan. Kita semua menggunakan kembali kata sandi lama lagi dan lagi karena mudah diingat.

Di mana saya bisa mendapatkan token untuk otentikasi?

Anda bisa mendapatkannya dari panel pengguna, untuk menggunakan otentikasi token, Anda perlu mengaktifkan otentikasi 2FA.

Lihat 2FA Help untuk mengaktifkan 2FA: Pelajari cara mengaktifkan otentikasi 2FA

Setelah itu Anda bisa mendapatkan token dari panel pengguna

get token

Can I use token authentication and username/password authentication at the same time?

Tidak, Anda dapat mengaktifkan/menonaktifkan otentikasi token kapan saja di panel pengguna, tetapi Anda tidak dapat menggunakan keduanya secara bersamaan. Jika otentikasi token dinonaktifkan, Anda harus menggunakan nama pengguna/kata sandi, jika otentikasi token diaktifkan, Anda harus menggunakan otentikasi token.

Di mana saya dapat mengaktifkan/menonaktifkan otentikasi token?

Di panel pengguna ada opsi untuk mengaktifkan/menonaktifkan otentikasi token.

enable/disable token

Apa yang harus saya lakukan selanjutnya?

Saat menggunakan otentikasi token pada deathbycaptcha API, Anda perlu mengubah klien Anda untuk menggunakan authToken alih -alih nama pengguna/kata sandi.

Mengacu pada setiap kode klien untuk menggunakan otentikasi berbasis token pada setiap kasus

Contoh Klien

require_once 'deathbycaptcha.php';

// Put your DBC credentials here.
// Use DeathByCaptcha_HttpClient class if you want to use HTTP API.
// To use token username must be authtoken.
$client = new DeathByCaptcha_SocketClient("authtoken", token-from-panel);

// Put the CAPTCHA file name or handler, and desired timeout (in seconds) here:
if ($captcha = $client->decode(CAPTCHA_FILE_NAME, TIMEOUT)) {
    echo $captcha['text'] . "\n";

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

// Repeat for other CAPTCHAs
// Do not forget to reference DeathByCaptcha.dll in your project!
using DeathByCaptcha;

// Put your DBC credentials here.
// Use HttpClient class if you want to use HTTP API.
// Using token authentication in C#/VB, username must be authtoken.

Client client = (Client) new SocketClient("authtoken", token-from-panel);

// Put your CAPTCHA file name, stream, or vector of bytes,
// and desired timeout (in seconds) here:
Captcha captcha = client.Decode(CAPTCHA_FILE_NAME, TIMEOUT);
if (captcha.Solved && captcha.Correct) {
    Console.WriteLine("CAPTCHA {0}: {1}", captcha.Id, captcha.Text);

    // Report the CAPTCHA if solved incorrectly.
    // Make sure the CAPTCHA was in fact incorrectly solved!
    if ( ... ) {
        client.Report(captcha);
    }
}

// Repeat for other CAPTCHAs
// Do not forget to reference DeathByCaptcha.dll in your project!
  Imports DeathByCaptcha
        ' Dim clnt As New HttpClient("autoken", token-from-panel)
        Dim clnt As New SocketClient("authtoken", token-from-panel)
        Console.WriteLine(String.Format(
                            "Your balance is {0,2:f} US cents", clnt.Balance))
        ' Uploading captchas with type = 2 (Coordinates API)
        ' Dim ext_data As New Hashtable()
        ' ext_data.Add("type", 2)
        ' Put your CAPTCHA image file name, file object, stream, or vector
        ' of bytes, and optional solving timeout (in seconds) here:
        ' Dim cptch As Captcha = clnt.Decode(
                    CAPTCHA_FILE_NAME, 2 * Client.DefaultTimeout, ext_data)
        ' Uploading captchas with type = 3 (Image Group API)
        ' Dim ext_data As New Hashtable()
        ' ext_data.Add("type", 3)
        ' ext_data.Add("banner_text", "Select all images with meat")
        ' ext_data.Add("grid", "4x4") ' this is optional
        ' ext_data.Add("banner", bannerFileName)
        ' Put your CAPTCHA image file name, file object, stream, or vector
        ' of bytes, and optional solving timeout (in seconds) here:
        ' Dim cptch As Captcha = clnt.Decode(
                        CAPTCHA_FILE_NAME, 2 * Client.DefaultTimeout, ext_data)
        ' Put your CAPTCHA image file name, file object, stream, or vector
        ' of bytes, and optional solving timeout (in seconds) here:
        Dim cptch As Captcha = clnt.Decode(
                            CAPTCHA_FILE_NAME, 2 * Client.DefaultTimeout)
        If cptch IsNot Nothing Then
            Console.WriteLine(String.Format(
                            "CAPTCHA {0:d} solved: {1}", cptch.Id, cptch.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 clnt.Report(cptch) Then
            '    Console.WriteLine("Reported as incorrectly solved")
            'Else
            '    Console.WriteLine("Failed reporting as incorrectly solved")
            'End If
        End If
  ' Repeat for other CAPTCHAs
  
      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-from-panel"
      # Put the proxy and reCaptcha token data
      Captcha_dict = {
          'proxy': 'http://user:[email protected]:1234',
          'proxytype': 'HTTP',
          'googlekey': '6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_f',
          'pageurl': 'http://google.com'}
      # Create a json string
      json_Captcha = json.dumps(Captcha_dict)
      client = deathbycaptcha.SocketClient(username, password, authtoken)
      # to use http client = deathbycaptcha.HttpClient(username, password)
      # client = deathbycaptcha.HttpClient(username, password, authtoken)
      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 its 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")
  # Repeat for other CAPTCHAs
  
  
      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-from-panel"
      # Put the proxy and reCaptcha token data
      captcha_dict = {
          'proxy': 'http://user:[email protected]:1234',
          'proxytype': 'HTTP',
          'googlekey': '6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_b',
          'pageurl': 'http://google.com'}
      # Create a json string
      json_captcha = json.dumps(captcha_dict)
      # to use socket client
      client = deathbycaptcha.SocketClient(username, password, authtoken)
      # to use http client
      # client = deathbycaptcha.HttpClient(username, password, authtoken)
      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 its 
                  # 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"
  # Repeat for other CAPTCHAs
  
  
    const dbc = require('./deathbycaptcha.js');

    const username = 'username';     // DBC account username
    const password = 'password';     // DBC account password
    // if using username/password, authtoken must be an empty string
    // authentication token can be enabled in user panel
    const authtoken = 'token-from-panel'; //DBC account authtoken

    // Proxy and Recaptcha token data
    const token_params = JSON.stringify({
      'proxy': 'http://username:[email protected]:3128',
      'proxytype': 'HTTP',
      'googlekey': '6Lc2fhwTAAAAAGatXTzFYfvlQMI2T7B6ji8UVV_f',
      'pageurl': 'http://google.com'
    });

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

    // 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);
        // });
      }

    });
  // Repeat for other CAPTCHAs
  
  
    import com.DeathByCaptcha.AccessDeniedException;
    import com.DeathByCaptcha.Client;
    import com.DeathByCaptcha.HttpClient;
    import com.DeathByCaptcha.SocketClient;
    import com.DeathByCaptcha.Captcha;
    import java.io.IOException;

    class ExampleSimple
    {
        public static void main(String[] args)
            throws Exception
        {
            // Put your DBC username & password || authtoken here:
            // if the number of arguments is two we are using authtoken
            // if the number of arguments is three we are using 
            // username/password combination
            System.out.println(args.length);
            Client client;
            // using http API
            /*
            if(args.length == 3){
                client = (Client)(new HttpClient(args[0], args[1]));
            }else if(args.length == 2){
                client = (Client)(new HttpClient(args[0]));
            }else{
                System.out.println("Wrong number of arguments");
                System.out.println("You must use username/password combination");
                System.out.println("Or API key");
                return;
            }
            */
            // using sockets API
            if(args.length == 3){
                client = (Client)(new SocketClient(args[0], args[1]));
            }else if(args.length == 2){
                client = (Client)(new SocketClient(args[0]));
            }else{
                System.out.println("Wrong number of arguments");
                System.out.println("You must use username/password combination");
                System.out.println("Or API key");
                return;
            }
            client.isVerbose = true;

            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 {
                    // Upload a CAPTCHA and poll for its status with 120 seconds 
                    // timeout. Put you CAPTCHA image file name, file object, 
                    // input stream, or vector of bytes, and optional 
                    // solving timeout (in seconds) here.
                    if (args.length == 3){
                        captcha = client.decode(args[2], 120);
                    }else if (args.length == 2){
                        captcha = client.decode(args[1], 120);
                    }else{
                        System.out.println("Failed uploading CAPTCHA - args");
                        return;
                    }
                } 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);
            }
        }
    }

  // Repeat for other CAPTCHAs
  
  
      #!/usr/bin/env perl

      use strict;
      use warnings;
      use lib '.';
      use DeathByCaptcha::HttpClient;
      use DeathByCaptcha::SocketClient;


      my ($username, $password, $filename) = @ARGV;

      # Put your DeathByCaptcha username & password here:
      # if using authtoken authentication username must be "authtoken"
      # and $password must be the authtoken from user panel
      # using authtoken in user panel disables username/password authentication
      my $client = DeathByCaptcha::HttpClient->new($username, $password);
      # my $client = DeathByCaptcha::SocketClient->new($username, $password);

      printf("Your balance is %f US cents\n", $client->getBalance());

      if ($filename) {
        printf("Provided captcha: $filename \n");
        # Put your CAPTCHA image file name and desired solving timeout 
      # (in seconds) here:
        my $captcha = $client->decode($filename,
                                      +DeathByCaptcha::Client::DEFAULT_TIMEOUT);
        if (defined $captcha) {
            print "CAPTCHA " . $captcha->{"captcha"} .
                  " solved: " . $captcha->{"text"} . "\n";

            # Report if the CAPTCHA was solved incorrectly.
            # Make sure it was in fact solved incorrect, do not just report every
            # CAPTCHA, or you'll get banned as abuser.
            # $client->report($captcha->{"captcha"});
        }
      } else {
        printf("No captcha provided \n");
      }
  // Repeat for other CAPTCHAs
  

Status: OK

Server beroperasi penuh dengan waktu respons yang lebih cepat dari rata-rata.
  • Waktu penyelesaian rata-rata
  • 3 detik - Normal CAPTCHAs (1 menit. yang lalu)
  • 53 detik - reCAPTCHA V2, V3, etc (1 menit. yang lalu)
  • 66 detik - hCAPTCHA & yang lain (1 menit. yang lalu)
Chrome and Firefox logos
Ekstensi browser tersedia

Pembaruan

  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. পূর্ববর্তী আপডেট…

Mendukung

Sistem kami dirancang untuk sepenuhnya ramah pengguna dan mudah digunakan. Jika Anda memiliki masalah dengan itu, cukup email kami diEmail dukungan teknis DBC com, dan agen dukungan akan menghubungi Anda sesegera mungkin.

Dukungan Langsung

Tersedia Senin hingga Jumat (10 pagi hingga 4 sore EST) Live support image. Link to live support page