FriendlyCaptchaToken
Solve Friendly Captcha v1 and v2 through your proxy from the sitekey and widget script URLs. Shows the request schema, an example and provider prices.
FriendlyCaptchaToken solves Friendly Captcha through your proxy and returns the token the form expects. Friendly Captcha is a proof-of-work CAPTCHA: the widget solves a puzzle in the visitor's browser and the form submits the result. The task takes the page URL, the sitekey and the widget script URLs.
Use this task when the site checks that the solve came from the same IP as your own requests. Otherwise use FriendlyCaptchaTokenProxyLess, which takes the same parameters without a proxy.
Find the parameters
websiteKeyis thedata-sitekeyattribute of thedivwith thefrc-captchaclass. Friendly Captcha sitekeys start withFC.versionisv1for thefriendly-challengewidget andv2for the@friendlycaptcha/sdkwidget. Search the page source forfriendly-challengeor@friendlycaptcha/sdkto tell them apart. The default isv1.moduleScriptis thesrcof the Friendly Captcha script tag withtype="module". Friendly Captcha documents the standard URLs ashttps://cdn.jsdelivr.net/npm/friendly-challenge@0.9.18/widget.module.min.jsfor v1 andhttps://cdn.jsdelivr.net/npm/@friendlycaptcha/sdk@1.1.3/site.min.jsfor v2. Pages can host the file on their own domain, so copy the URL from the page.nomoduleScriptis optional. It is thesrcof the script tag with thenomoduleattribute (widget.min.json v1,site.compat.min.json v2).
Send the proxy
task.proxy is required on this task type, and the provider solves from that address. The proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve.
Use the token
On v1, set solution.token as the value of the form field named frc-captcha-solution. On v2, the field is frc-captcha-response. A site can rename the field with the data-solution-field-name attribute, so confirm it by submitting the form once in a browser with the DevTools Network tab open. If the widget element has a data-callback function, you can call it with the token instead.
Load the page without the Friendly Captcha widget script when you apply the token, for example by blocking the request to the module script. A widget that is already running can overwrite or reject the value. If the token is rejected, check that the proxy kept one IP for the whole solve, then that websiteKey and websiteURL come from the page that shows the widget.
Related tasks
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.50 | |
SolveCaptcha | $1.45 | |
SCTG | $0.40 |
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 CAPTCHA is displayed. Example: |
websiteKey* | string | Yes | The Example: |
moduleScript* | string | Yes | URL of the script the page loads with Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
version | No | Friendly Captcha major version used on the page: Example: | |
nomoduleScript | string | No | URL of the script the page loads with the Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "FriendlyCaptchaToken",
"websiteURL": "https://example.com/signup",
"websiteKey": "FCMGD8BOO9CFF3RA",
"moduleScript": "https://cdn.jsdelivr.net/npm/friendly-challenge@0.9.18/widget.module.min.js",
"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 |
|---|---|---|---|
token* | string | Yes | Solved token. Submit it as Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |
userAgent | string | No | User-Agent string used during solving. |