지원되는 태스크 유형
API 메소드
기사
튜토리얼
GitHub
문서 메뉴

pushAntiGateVariable: 안티게이트 태스크에 대한 변수 값을 제출하세요.

안티게이트 태스크의 경우, 태스크를 생성한 후에 변수 값은 나중에 체줄할 수 있는 특징이 있습니다. 이렇게 하려면, 다음의 단계를 따라주셔야 합니다.

  1. "WAIT_FOR_VARIABLE_VALUE" 단계를 템플릿에 추가하고 변수 이름을 영구 값으로 지정합니다.
  2. 모든 변수 값은 createTask 메소드로 전송되어야 하므로, 변수 값을 "_WAIT_FOR_IT_"으로 대체합니다.

태스크 생성 요청 시 다음과 같이 나타날 수 있습니다.

CURL
          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
        

변수 "my_late_variable" 업데이트 요청은 다음과 같이 나타나야 합니다.

CURL
          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
        

주소: https://api.anti-captcha.com/pushAntiGateVariable
메소드: POST
Content-type: application-json

프로퍼티 요청

프로퍼티 유형 필수 목적
clientKey 스트링
taskId 정수
name 스트링 변수 이름
value 모두 지연된 변수 값

반응 구조

프로퍼티 유형 목적
errorId 정수 오류 식별자.
0 - 오류 없음. 성공적으로 작업을 완료했습니다.
>1 - 오류 식별자. errorCodeerrorDescription 프로퍼티에서 전송된 오류 코드 및 짧은 설명.
errorCode 스트링
errorDescription 스트링 오류에 대한 짧은 설명

반응 예시

JSON(오류 없음)
          {
    "errorId":0,
    "status":"success"
}
        
JSON(오류 있음)
          {
    "errorId": 1,
    "errorCode": "ERROR_KEY_DOES_NOT_EXIST",
    "errorDescription": "Account authorization key not found in the system"
}