API referenceTask typesAWS WAF

AWS WAF

The Amazon bot control challenge, the one that shows a puzzle or a toy game before it hands over a token. The answer is a cookie you attach to the session.

Task types

Type stringProxyUse it for
AntiAwsWafTaskProxyLessNoneThe ordinary case.
AntiAwsWafTaskYoursRule sets configured to bind the token to an address.

Task object

Two fields are always required, and proxy is a third on AntiAwsWafTask. Everything after that lets you hand over what you already scraped off the challenge page, which makes the solve quicker and more reliable. Send what you have and leave out what you do not.

FieldTypeRequiredWhat it is
typeStringYesOne of the two above.
websiteURLStringYesThe address that served the challenge.
proxyStringOn AntiAwsWafTaskThe type without the ProxyLess suffix requires one, in either shape.
awsKeyStringNoThe key value on the challenge page.
awsIvStringNoThe iv value.
awsContextStringNoThe context value.
awsChallengeJSStringNoThe address of challenge.js.
awsApiJsStringNoThe address of jsapi.js.
awsProblemUrlStringNoThe problem endpoint, the one carrying num_solutions_required.
awsApiKeyStringNoThe api_key returned by the problem endpoint.
awsExistingTokenStringNoA previous aws-waf-token, when the site asks you to verify a second time.

Example

POST/createTask

{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "AntiAwsWafTaskProxyLess",
    "websiteURL": "https://example.com/checkout",
    "awsKey": "AQIDAHjcYu/GjX+QlghicBg...shMIKvZswZemrVVqA==",
    "awsIv": "CgAAFDIlckAAAAid",
    "awsContext": "7DhQfG5CmoY90ZdxdHCi8WtJ3z...njNKULdcUUVEtxTk=",
    "awsChallengeJS": "https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/41bcdd4fb/challenge.js"
  }
}

JSON

{
  "errorId": 0,
  "taskId": "646825ef-9547-4a29-9a05-50a6265f9d8a",
  "status": "ready",
  "solution": {
    "cookie": "223d1f60-0e9f-4238-ac0a-e766b15a778e:EQoAf0APpGIKAAAA:AJam3OWpff1VgKIJ..."
  }
}
Solution fieldWhat to do with it
cookieSet it as aws-waf-token on the session and repeat the request.

Finding the challenge values

  1. Request the protected page and keep the response even when it is a 405 or a 202. The challenge ships inside it.
  2. Search the body for window.gokuProps. The key, iv and context values sit there.
  3. The challenge.js address is the script tag on the same page, under a token.awswaf.com host.

Last updated 21 September 2026