TSPDCookie
Solve a TSPD challenge page through your own proxy and get the cookies that let your session through. With the request schema, an example and provider prices.
TSPDCookie solves a TSPD challenge through your proxy and returns the cookies to use for the following requests. TSPD is a bot defence that answers a first request with a challenge page and a set of TS... cookies instead of the real content. You send that page and those cookies.
Use your 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. Make the first request, create the task and send the requests that use the returned cookies from that same address and userAgent.
Recognize a TSPD block
Request the page through your proxy with browser-like headers and read the Set-Cookie headers of the response. A block looks like a few cookies named TS followed by hex digits, for example TS386a400d029 or TSd2153684027, and no TSPD_101_DID cookie. If the response already sets TSPD_101_DID, the protection was passed and there is nothing to solve.
Build the request
GET request to the page through your proxy and keep the response.Cookie header string and pass it as cookies.htmlPageBase64.userAgent you used for the request.solution.domains for every following request to that site.cookies and htmlPageBase64 change on every request. Capture them right before you create the task.
Use the cookies
solution.domains groups the cookies by domain. Set each cookie for its domain, including TSPD_101_DID when it is present (some providers return the name in lowercase), and request the page again.
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 | |
CapMonster | $0.50 |
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: |
cookies* | string | Yes | Cookies the server set on the TSPD challenge response, as a Example: |
htmlPageBase64* | string | Yes | Full HTML of the TSPD challenge page, base64-encoded. Capture it right before creating the task from the same IP and User-Agent you pass. Example: |
proxy* | string | object | Yes | Proxy the provider solves through, as a string or an object. See Proxy configuration. View proxy configurationExample: |
userAgent | string | No | Browser User-Agent string. Must match the browser used on the target page. Not all providers properly support this parameter. Verify the compatibility with the provider you are using. Example: |
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TSPDCookie",
"websiteURL": "https://example.com/login",
"cookies": "TS386a400d029=082670...010245; TS386a400d078=082670...dbb3b0c",
"htmlPageBase64": "PCFET0NUWVBFIGh0bWw+...",
"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 |
|---|---|---|---|
domains* | Record<string, unknown> | Yes | Cookies to replay on the target site, grouped by domain. Use them for all following requests, with the same IP and User-Agent. Example: |
raw* | Record<string, unknown> | Yes | Raw provider response data for advanced use cases. |