UNLOCK API
atbCAPTCHA

atbCAPTCHA

Come inviare un task atbCAPTCHA a UNLOCK API con createTask o in.php: nomi dei tipi di task, tutti i parametri, l'oggetto solution, i campi proxy ed esempi di codice in 7 linguaggi.
Prezzo
$0.725 $0.000725 per task
Invii
URL della pagina, app id e server API del widget
Ricevi
Token per il campo atbCAPTCHA

Panoramica e prezzo

Nomi dei tipi di task

Usa il primo nome per risolvere senza proxy. Usa il secondo nome e aggiungi i campi proxy per risolvere tramite il tuo proxy. Il prezzo è lo stesso.
AtbCaptchaTaskProxylessSenza proxy
AtbCaptchaTaskTramite il tuo proxy

Oggetto task

type
StringObbligatorio
Nome del tipo di task. Maiuscole e minuscole sono indifferenti. AtbCaptchaTaskProxyless | AtbCaptchaTask
websiteURL
StringObbligatorio
Indirizzo completo della pagina in cui compare il CAPTCHA, che inizia con http:// o https://.
appId
StringObbligatorio
L'app id del widget, dal sorgente della pagina.
apiServer
StringObbligatorio
Indirizzo del server API usato dal widget, dal sorgente della pagina.

I campi non elencati qui vengono passati al risolutore così come sono stati inviati.

Campi proxy

Solo per il nome del tipo con proxy. Invia i campi separati oppure una sola stringa proxy.
proxyType
StringObbligatorio
http, https, socks4 o socks5.
proxyAddress
StringObbligatorio
Indirizzo IP o nome host del proxy.
proxyPort
IntegerObbligatorio
Porta del proxy.
proxyLogin
StringFacoltativo
Nome utente del proxy, se richiesto.
proxyPassword
StringFacoltativo
Password del proxy, se richiesta.
proxy
String
Tutti i campi proxy in una stringa, ad esempio http://user:pass@1.2.3.4:8080.

Usare un proxy

Richiesta

POST /createTask
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AtbCaptchaTaskProxyless",
    "websiteURL": "https://example.com/login",
    "appId": "af25e409b33d722a95e56a230ff8771c",
    "apiServer": "https://cap.aisecurius.com"
  }
}

Oggetto solution

Restituito in solution quando status è ready.
token
String
Il token da inviare con il form della pagina.
POST /getTaskResult
{
  "errorId": 0,
  "taskId": 1001,
  "status": "ready",
  "solution": {
    "token": "sl191suxzluwxxh6f:"
  },
  "cost": "0.000725",
  "createTime": 1791640000,
  "endTime": 1791640014,
  "solveCount": 1
}

Esempi di codice

import time, requests

API = "https://unlock-api.com"
KEY = "YOUR_API_KEY"

task = requests.post(f"{API}/createTask", json={
    "clientKey": KEY,
    "task": {
      "type": "AtbCaptchaTaskProxyless",
      "websiteURL": "https://example.com/login",
      "appId": "af25e409b33d722a95e56a230ff8771c",
      "apiServer": "https://cap.aisecurius.com"
    }
}).json()
if task["errorId"]:
    raise SystemExit(task["errorCode"])

for _ in range(60):   # 60 x 5 s = the 5 minute task limit
    time.sleep(5)
    r = requests.post(f"{API}/getTaskResult", json={"clientKey": KEY, "taskId": task["taskId"]}).json()
    if r["errorId"]:
        raise SystemExit(f"{r['errorCode']}: {r.get('errorDescription', '')}")   # failed tasks are refunded
    if r["status"] == "ready":
        print(r["solution"]["token"])
        break
else:
    raise SystemExit("timed out")

Metodo form in.php

Lo stesso task con la classica richiesta form. res.php restituisce la risposta come testo.
in.php, res.php
curl -s "https://unlock-api.com/in.php" -d "key=YOUR_API_KEY&method=atb_captcha&appId=APP_ID&apiServer=https://cap.aisecurius.com&pageurl=https://example.com/login&json=1"
# {"status":1,"request":"1001"}

curl -s "https://unlock-api.com/res.php?key=YOUR_API_KEY&action=get&id=1001&json=1"
# {"status":0,"request":"CAPCHA_NOT_READY"}  then  {"status":1,"request":"ANSWER"}

API a form: in.php e res.php