KeyCaptchaToken
Solve KeyCAPTCHA through your own proxy from the s_s_c page parameters and get the response token. Shows the request schema, an example and provider prices.
KeyCaptchaToken solves a KeyCAPTCHA puzzle through your proxy and returns the token the page expects. KeyCAPTCHA is a puzzle CAPTCHA that the page configures through a set of s_s_c_* JavaScript variables, and the task takes the page URL and four of those values.
Use KeyCaptchaTokenProxyLess when the site accepts a token solved from the provider network.
Use your proxy
task.proxy is required on this task type. The provider solves from that address, and the proxy must keep one IP for the whole solve: see Keep the same IP for the whole solve. Use the same proxy for the request that submits the token.
Find the parameters
Open the page source or the Console and search for s_s_c_. Copy these variables:
| Task field | Page variable |
|---|---|
userId | s_s_c_user_id |
sessionId | s_s_c_session_id |
webServerSign | s_s_c_web_server_sign |
webServerSign2 | s_s_c_web_server_sign2 |
Send the URL of the page that shows the puzzle as websiteURL. Read all values from the same page load you solve for, right before you create the task.
Values change on every page load
s_s_c_session_id changes each time the page loads, and the signature values belong to that session. Read the
values from the same page load you solve for, right before you create the task.
Use the token
Submit the solution token in the form field or request parameter that carries the KeyCAPTCHA response. To find it, submit the form once in a browser with the DevTools Network tab open and look for the parameter that holds the response.
If the site rejects the token, check that the proxy kept one IP for the whole solve, then that websiteURL and the four values come from the same page load.
Check Provider stats for live success rates and solve times before you pick a provider.
Supported Providers
| Provider | Price per 1,000 | Routing |
|---|---|---|
2Captcha | $2.99 |
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: |
userId* | string | Yes | Value of the Example: |
sessionId* | string | Yes | Value of the Example: |
webServerSign* | string | Yes | Value of the Example: |
webServerSign2* | string | Yes | Value of the Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "KeyCaptchaToken",
"websiteURL": "https://2captcha.com/demo/keycaptcha",
"userId": "184015",
"sessionId": "80f5f77b8b396b6cb6ea59cf22c38c55",
"webServerSign": "418910f3da05d4e3125030e4f9c95d42",
"webServerSign2": "118b538926cf9aafc48926bcaccf4c0e",
"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 | The solved CAPTCHA token to submit with your form. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |