Menu

pushAntiGateVariable: submit a variable value for AntiGate task

AntiGate tasks have a feature: variable values can be submitted later, after a task was created. To do this, follow these steps:

  1. Add a step "WAIT_FOR_VARIABLE_VALUE" to your template and specify the variable name as a permanent value.
  2. As all the variable values should be sent to createTask method, substitute the variable value with the string "_WAIT_FOR_IT_".

If your task creation request could look something like this:

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

Then a request updating the variable "my_late_variable" should look like this:

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

Address: https://api.anti-captcha.com/pushAntiGateVariable
Method: POST
Content-type: application-json

Request properties

PropertyTypeRequiredPurpose
clientKeyStringYes
taskIdIntegerYes
nameStringYesName of the variable
valueAnyYesValue of the postponed variable

Response structure

PropertyTypePurpose
errorIdIntegerError identifier.
0 - no errors, operation completed successfully.
>0 - error identifier. Error code with short description are available in errorCode and errorDescription properties.
errorCodeString
errorDescriptionStringShort description of the error

Response example

JSON with no errors
JSON with an error
{
    "errorId":0,
    "status":"success"
}