Skip to Content
AnySolver logo
AnySolver
Token

AmazonToken

Solve the Amazon AWS WAF CAPTCHA through your own proxy from the key, iv and context values or the jsapi script. With the schema, example and prices.

AmazonToken solves the Amazon AWS WAF CAPTCHA through your proxy and returns a captchaVoucher and an existingToken. AWS WAF serves the CAPTCHA when a request trips a rule.

Use AmazonTokenProxyLess when the site accepts a token solved from another address. To get the aws-waf-token cookie instead of a voucher, use AWSWafToken.

Proxy

task.proxy is required on this task type, and the provider solves from that address. Send the proxy you use for your own requests to the site, and keep one IP for the whole solve: see Keep the same IP for the whole solve.

Choose a variant

The task has two variants, and the scripts the page loads decide which one you use.

The page loadsSend
challenge.js and captcha.jswebsiteURL, websiteKey, iv and context, plus challengeScript and captchaScript with the script URLs
jsapi.jswebsiteURL, websiteKey and jsapiScript

Find the parameters

Open the page source, or the Network tab, on the page that shows the AWS WAF CAPTCHA.

  • websiteKey is the key value in the page's AWS WAF configuration, the gokuProps object on pages that expose one.
  • iv and context are the values of the same names in that configuration.
  • challengeScript, captchaScript and jsapiScript are the src URLs of the challenge.js, captcha.js and jsapi.js scripts, for example https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/.../challenge.js.

Capture fresh values for each task

websiteKey, iv and context change between requests. Read them from the page right before you create the task.

Use the voucher

The solution returns captchaVoucher and existingToken. Send them to the site the way the AWS WAF CAPTCHA script does, as the captcha_voucher and existing_token values of its verification request. The exact request depends on the site: submit the CAPTCHA once in a browser with the DevTools Network tab open and find the request that carries them.

If the site rejects the voucher, check that the proxy kept one IP for the whole solve, then that the parameters come from the page that shows the CAPTCHA.

Check Provider stats for live success rates and solve times before you pick a provider.

Supported Providers

ProviderPrice per 1,000Routing
2Captcha
$1.45
Anti-Captcha
$2.00
CapMonster
$1.40
SolveCaptcha
$0.80

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

Per-request settings for routing, Auto Retry, Auto Fallback, proxy reuse, response statistics and detailed analytics. Each field overrides the API key's value. See Routing modes.

View settings reference

Task Object Properties

The task field accepts an object with the following properties:

FieldTypeRequiredDescription
type*
Yes
websiteURL*
URLYes

Full URL of the page where the Amazon AWS WAF challenge is shown.

Example: https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest

proxy*
string | objectYes

Proxy the provider solves through, as a string or an object. See Proxy configuration.

View proxy configuration

Example: http://user:pass@1.2.3.4:8080

websiteKey
stringNo

Amazon WAF key value found in the page source. Required for the challenge.js and jsapi.js variants; it changes between requests.

Example: AQIDA...wZwdADFLWk7XOA==

iv
stringNo

Amazon WAF iv value found in the page source. Required for the challenge.js variant; it changes between requests.

Example: CgAAXFFFFSAAABVk

context
stringNo

Amazon WAF context value found in the page source. Required for the challenge.js variant; it changes between requests.

Example: qoJYgnKsc...aormh/dYYK+Y=

challengeScript
URLNo

Source URL of the challenge.js script on the page.

Example: https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/41bcdd4fb3cb/0d21de737ccb/cd77baa6c832/challenge.js

captchaScript
URLNo

Source URL of the captcha.js script on the page.

Example: https://41bcdd4fb3cb.610cd090.us-east-1.captcha.awswaf.com/41bcdd4fb3cb/0d21de737ccb/cd77baa6c832/captcha.js

jsapiScript
URLNo

Source URL of the jsapi.js script. Use it, with websiteKey, when the page exposes the jsapi.js variant instead of challenge.js and captcha.js.

Example: https://82d925f87a91.edge.captcha-sdk.awswaf.com/82d925f87a91/jsapi.js

{
    "clientKey": "YOUR_API_KEY",
    "task": {
        "type": "AmazonToken",
        "websiteURL": "https://non-existent-example.execute-api.us-east-1.amazonaws.com/latest",
        "proxy": "http://user:pass@1.2.3.4:8080"
    }
}

Optional fields are not guaranteed across providers

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
captchaVoucher*
stringYes

Amazon WAF captcha_voucher value to submit to the target site.

Example: eyJ0eXAiO...oQjTnJlBvAW4

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.

existingToken
stringNo

Amazon WAF existing_token value to send with the following requests.

Example: f8ab5749-f916-...5D8yAA39JtKVbw=