AWSWafTokenProxyLess
Solve an AWS WAF challenge or CAPTCHA without a proxy and get the aws-waf-token cookie. Shows the request schema, an example and provider prices.
AWSWafTokenProxyLess solves an AWS WAF challenge or CAPTCHA and returns the aws-waf-token cookie value. AWS WAF can answer a request with a silent challenge or with a visual CAPTCHA, and either way the browser ends up with that cookie on later requests.
Use this task when the site accepts a cookie earned from another address. If the site ties the cookie to the address that earned it, use AWSWafToken with the proxy you request through. AmazonTokenProxyLess solves the same Amazon WAF CAPTCHA with different parameters and returns a captchaVoucher instead of a cookie.
Which parameters to send
Only websiteURL is always required. The other fields depend on what the page exposes. Pick the first case that matches.
| What you find on the page | Send |
|---|---|
The blocked response (often HTTP 405) contains window.gokuProps = {"key":"...","iv":"...","context":"..."} | websiteURL, and optionally awsKey, awsIv, awsContext and awsChallengeJS |
No gokuProps, but a challenge.js script | websiteURL and awsChallengeJS |
No challenge.js, but a jsapi.js script | websiteURL and awsApiJs |
Only captcha.js, with a problem endpoint that contains problem and num_solutions_required | websiteURL and awsProblemUrl |
| A second verification after you already hold a token | websiteURL, awsApiKey, awsApiJs and awsExistingToken |
Where each value lives
Read awsKey, awsIv, awsContext and awsChallengeJS from the same page load, right before you create the task.
| Field | Where to find it |
|---|---|
awsKey | The key field of window.gokuProps in the HTML of the challenge page |
awsIv | The iv field of window.gokuProps |
awsContext | The context field of window.gokuProps |
awsChallengeJS | The src of the AWS WAF challenge.js script, for example https://41bcdd4fb3cb.610cd090.us-east-1.token.awswaf.com/.../challenge.js |
awsApiJs | The src of the jsapi.js CAPTCHA SDK script |
awsProblemUrl | The full problem endpoint URL: search the page HTML for visualSolutionsRequired |
awsApiKey | The api_key of the problem endpoint, which stays the same for one website |
awsExistingToken | The aws-waf-token from the previous verification |
Read key, iv and context fresh
awsKey, awsIv, awsContext and awsChallengeJS belong together and expire. If a provider reports that your
parameters are expired or do not match, fetch all of them again from the same page load and send the new set.
Not every provider supports every field. Providers use the ones they understand and ignore the rest, so send everything the page gives you.
platform
platform selects the AWS WAF SDK flow: web (the default) for browser pages, android or ios for mobile apps. Providers that do not support it ignore it.
Use the cookie
Set aws-waf-token as a cookie on requests to the protected site. Some providers solve only the visual CAPTCHA step and return a captchaVoucher instead of issuing a cookie. Use the userAgent from the solution for your requests when it is present.
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 | |
Solverify | $0.50 | |
DraxonSolver | $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 that returns the AWS WAF challenge or captcha. Example: |
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": "AWSWafTokenProxyLess",
"websiteURL": "https://efw47fpad9.execute-api.us-east-1.amazonaws.com/latest"
}
}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. |