Skip to Content
AnySolver logo
AnySolver
Cookie

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

Send the first GET request to the page through your proxy and keep the response.
Join the cookies from that response into one Cookie header string and pass it as cookies.
Base64-encode the full HTML body of the same response and pass it as htmlPageBase64.
Create the task with the same proxy and userAgent you used for the request.
Use the cookies in 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

ProviderPrice per 1,000Routing
2Captcha
$2.99
CapMonster
$0.50

Request Schema

FieldTypeRequiredDescription
clientKey*
stringYes

Your API key. Create one in a workspace of the AnySolver dashboard.

Example: your-api-key-from-dashboard

task*
objectYes

The task body. Required fields depend on the task type. See Tasks for per-task schemas.

View task properties
settings
objectNo

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:

FieldTypeRequiredDescription
type*
Yes
websiteURL*
URLYes

Full URL of the page where the CAPTCHA is displayed.

Example: https://example.com/login

cookies*
stringYes

Cookies the server set on the TSPD challenge response, as a Cookie header string, for example TS386a400d029=...; TS386a400d078=.... Capture them together with the page, right before creating the task. If the response already sets TSPD_101_DID, the challenge was passed and there is nothing to solve.

Example: TS386a400d029=082670...010245; TS386a400d078=082670...dbb3b0c

htmlPageBase64*
stringYes

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: PCFET0NUWVBFIGh0bWw+...

proxy*
string | objectYes

Proxy the provider solves through, as a string or an object. See Proxy configuration.

View proxy configuration

Example: http://user:pass@1.2.3.4:8080

userAgent
stringNo

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: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

{
    "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

Required fields are guaranteed across every provider that supports this task. Optional fields may be honored by some providers and silently ignored by others. AnySolver does not document per-provider parameter support, so before relying on an optional field, check that provider's own docs for the task you are using.

Response Schema

FieldTypeRequiredDescription
status*
Yes

Task status: "processing", "ready", or "failed".

Example: ready

errorId*
Yes

0 on success; 1 or 2 on an error. Branch on errorCode: Error IDs explains the two error groups.

Example: 0

taskId
stringNo

Unique identifier returned when the task was created.

Example: 01KFNDF328KAN2AJ3BNHCQYE88

errorCode
No

Machine-readable error code.

Example: CAPTCHA_UNSOLVABLE

errorDescription
stringNo

Human-readable error message with resolution hints.

Example: The captcha could not be solved.

cost
numberNo

Actual cost charged for this task in USD.

Example: 0.002

taskType
No

The type of CAPTCHA task to solve.

Example: ReCaptchaV2TokenProxyLess

provider
No

Provider that handled this task. While processing, the provider currently solving it.

Example: Multibot

solution
objectNo

Solution Object Properties

The solution field contains an object with the following properties:

FieldTypeRequiredDescription
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: {"example.com":{"cookies":{"tspd_101_DID":"082670...1d53f"}}}

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.