Menu

pushAntiGateVariable: invia un valore variabile per attività AntiGate

Le attività AntiGate hanno una funzione: i valori variabili possono essere inviati più tardi, dopo che un'attività è stata creata. Per fare ciò, segui questi passaggi:

  1. Aggiungi un passaggio "WAIT_FOR_VARIABLE_VALUE" al tuo modello e specifica il nome della variabile come valore permanente.
  2. Come tutti i valori delle variabili deve essere inviato al metodo createTask, sostituisci il valore della variabile con una stringa "_WAIT_FOR_IT_".

Se la tua richiesta di creazione dell'attività potrebbe apparire più o meno così:

curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "task":
        {
            "type":"AntiGateTask",
            "websiteURL":"https://some-website.com/path",
            "templateName":"Template name here",
            "variables": {
                "my_late_variable":"_WAIT_FOR_IT_",
                "other_var1":"some value",
                "other_var2":"some value"
            }
        }
}' https://api.anti-captcha.com/createTask

Allora la richiesta di aggiornamento della variabile "my_late_variable" dovrebbe apparire così:

curl -i -H "Accept: application/json" \
-H "Content-Type: application/json" \
-X POST -d '{
    "clientKey":"YOUR_API_KEY",
    "taskId":123456,
    "name":"my_late_variable",
    "value":"The value which worker should be waiting for"
}' https://api.anti-captcha.com/pushAntiGateVariable

Indirizzo: https://api.anti-captcha.com/pushAntiGateVariable
Metodo: POST
Content-type: application-json

Richiedi proprietà

Proprietà Tipo Richiesto Scopo
clientKey Stringa
taskId Intero
name Stringa Nome della variabile
value Tutti Valore della variabile spostata

Struttura risposta

Proprietà Tipo Scopo
errorId Intero Identificatore errore.
0 - nessun errore, operazione completata con successo.
>0 - Identificatore errore. Il codice errore e una sua breve descrizione sono disponibili nelle proprietà errorCode e errorDescription.
errorCode Stringa
errorDescription Stringa Breve descrizione dell'errore

Esempio di risposta

JSON senza errori
JSON con un errore
{
    "errorId":0,
    "status":"success"
}