Cookie usage notification

This site uses cookies. Cookies remember you, so we can provide you with personalized services. Read our privacy policy.

Logo of «GitHub»
  • We support API for «PHP» language
  • We support API for «Python» language
  • We support API for «Go» language
  • We support API for «Ruby» language
  • We support API for «C#» language
  • We support API for «Java» language
  • We support API for «JavaScript» language

atbCAPTCHA

atbCAPTCHA

Token-based method to bypass atbCAPTCHA.

Task types

  • AtbCaptchaTaskProxyless - we use our own pool of proxies
  • AtbCaptchaTask - we use your proxies

AtbCaptchaTaskProxyless task type specification

Property Type Required Description
type String Yes Task type:
AtbCaptchaTaskProxyless
AtbCaptchaTask
websiteURL String Yes The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users
appId String Yes The value of appId parameter in the website source code.
apiServer String Yes The value of apiServer parameter in the website source code.

AtbCaptchaTask task type specification

AtbCaptchaTask extends AtbCaptchaTaskProxyless adding a set of proxy-related parameters listed below

Property Type Required Description
proxyType String Yes Proxy type:
http
socks4
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

AtbCaptchaTaskProxyless

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type":"AtbCaptchaTaskProxyless",
        "appId":"af23e041b22d000a11e22a230fa8991c",
        "apiServer":"https://cap.aisecurius.com",
        "websiteURL":"https://www.example.com/"
    }
}

AtbCaptchaTask

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type":"AtbCaptchaTask",
        "appId":"af23e041b22d000a11e22a230fa8991c",
        "apiServer":"https://cap.aisecurius.com",
        "websiteURL":"https://www.example.com/",
        "proxyType": "http",
        "proxyAddress": "1.2.3.4",
        "proxyPort": "8080",
        "proxyLogin": "user23",
        "proxyPassword": "p4$w0rd"
    }
}

Response example

{
    "errorId": 0,
    "status": "ready",
    "solution": {
        "token": "sl191suxzluwxxh6f:"
    },
    "cost": "0.00299",
    "ip": "1.2.3.4",
    "createTime": 1692863536,
    "endTime": 1692863556,
    "solveCount": 1
}

Using the token

The token is passed to a callback function defined in success property during the captcha initialization. This function is usually used to make a request to the website backend where the token is verified. You can execute the callback function passing the token as an argument or build a request to the backend using passing the token.

const myCallbackFunction = (token) {
    // verify the token
}
var myCaptcha = as.Captcha(document.getElementById('demo'), {
    appId: 'af23e041b22d000a11e22a230fa8991c', 
    success: myCallbackFunction
})

Code examples

# https://github.com/2captcha/2captcha-python
import sys
import os

sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))

from twocaptcha import TwoCaptcha

api_key = os.getenv('APIKEY_2CAPTCHA', 'YOUR_API_KEY')

solver = TwoCaptcha(api_key)

try:
  result = solver.atb_captcha(
      app_id='af23e041b22d000a11e22a230fa8991c',
      api_server='https://cap.aisecurius.com',
      url='http://www.example.com/',
  )

except Exception as e:
  sys.exit(e)

else:
  sys.exit('result: ' + str(result))