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 loads | Send |
|---|---|
challenge.js and captcha.js | websiteURL, websiteKey, iv and context, plus challengeScript and captchaScript with the script URLs |
jsapi.js | websiteURL, websiteKey and jsapiScript |
Find the parameters
Open the page source, or the Network tab, on the page that shows the AWS WAF CAPTCHA.
websiteKeyis thekeyvalue in the page's AWS WAF configuration, thegokuPropsobject on pages that expose one.ivandcontextare the values of the same names in that configuration.challengeScript,captchaScriptandjsapiScriptare thesrcURLs of thechallenge.js,captcha.jsandjsapi.jsscripts, for examplehttps://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
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $1.45 | |
Anti-Captcha | $2.00 | |
CapMonster | $1.40 | |
SolveCaptcha | $0.80 |
Request Schema
| Field | Type | Required | Description |
|---|---|---|---|
clientKey* | string | Yes | Your API key. Create one in a workspace of the AnySolver dashboard. Example: |
task* | object | Yes | The task body. Required fields depend on the task type. See Tasks for per-task schemas. View task properties |
settings | object | No | 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:
| Field | Type | Required | Description |
|---|---|---|---|
type* | Yes | ||
websiteURL* | URL | Yes | Full URL of the page where the Amazon AWS WAF challenge is shown. Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
websiteKey | string | No | Amazon WAF Example: |
iv | string | No | Amazon WAF Example: |
context | string | No | Amazon WAF Example: |
challengeScript | URL | No | Source URL of the Example: |
captchaScript | URL | No | Source URL of the Example: |
jsapiScript | URL | No | Source URL of the Example: |
{
"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
Response Schema
| Field | Type | Required | Description |
|---|---|---|---|
status* | Yes | Task status: "processing", "ready", or "failed". Example: | |
errorId* | Yes |
Example: | |
taskId | string | No | Unique identifier returned when the task was created. Example: |
errorCode | No | Machine-readable error code. Example: | |
errorDescription | string | No | Human-readable error message with resolution hints. Example: |
cost | number | No | Actual cost charged for this task in USD. Example: |
taskType | No | The type of CAPTCHA task to solve. Example: | |
provider | No | Provider that handled this task. While processing, the provider currently solving it. Example: | |
solution | object | No |
Solution Object Properties
The solution field contains an object with the following properties:
| Field | Type | Required | Description |
|---|---|---|---|
captchaVoucher* | string | Yes | Amazon WAF Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |
existingToken | string | No | Amazon WAF Example: |