AWSWafToken
Solve an AWS WAF challenge or CAPTCHA through your own proxy and get the aws-waf-token cookie. Shows the request schema, an example and provider prices.
AWSWafToken solves an AWS WAF challenge or CAPTCHA through your proxy and returns the aws-waf-token cookie value. It is the same task as AWSWafTokenProxyLess: the parameters, where to find them and how to use the cookie are identical, so start from that page.
Use it when the site ties the cookie to the address that earned it. On this task type, RiskBypass also needs awsChallengeJS and fails with INVALID_TASK_DATA without it, so send it whenever the page loads challenge.js.
Proxy
task.proxy is required on this task type, and the provider solves from that address. Send the proxy you will use for the request that submits the cookie, and keep one IP for the whole solve: see Keep the same IP for the whole solve.
If the site still rejects the cookie, check that the proxy kept one IP and that the parameters come from a fresh load of the page that returns the challenge.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
CapSolver | $2.00 | |
CapMonster | $1.40 | |
RiskBypass | $1.00 | |
Solverify | $0.50 | |
DraxonSolver | $0.80 | |
VoidCaptcha | $1.45 |
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 that returns the AWS WAF challenge or captcha. Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
awsKey | string | No | The key value from window.gokuProps on the challenge page. Fetch key, iv and context fresh for every task. Example: |
awsIv | string | No | The iv value from window.gokuProps on the challenge page. Example: |
awsContext | string | No | The context value from window.gokuProps on the challenge page. Example: |
awsChallengeJS | URL | No | URL of the challenge.js script loaded by the page (the src of the awsThreatDetection script). Several providers require it; send it whenever the page loads one. Example: |
awsApiJs | URL | No | URL of the jsapi.js captcha SDK script, for pages that load jsapi.js instead of exposing challenge.js. Example: |
awsProblemUrl | URL | No | URL of the captcha problem endpoint, containing problem and num_solutions_required, for pages that only load captcha.js. Only some providers use it. Example: |
awsApiKey | string | No | The api_key of the problem endpoint, used for secondary verification together with awsExistingToken. Only some providers use it. Example: |
awsExistingToken | string | No | The aws-waf-token from the previous verification, for secondary verification. Only some providers use it. Example: |
platform | No | AWS WAF SDK flow to run: web for browser pages, android or ios for mobile apps. Defaults to web. Not every provider supports this; those that do not ignore it. Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AWSWafToken",
"websiteURL": "https://efw47fpad9.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 |
|---|---|---|---|
aws-waf-token* | string | Yes | The aws-waf-token cookie value. Set it as the aws-waf-token cookie on requests to the protected site. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |
captchaVoucher | string | No | Captcha voucher returned by providers that solve the visual captcha step instead of issuing a cookie. Example: |
userAgent | string | No | User-Agent string used during solving. |