Skip to Content
AnySolver logo
AnySolver
Token

AlibabaToken

Solve Alibaba Cloud CAPTCHA through your own proxy from the sceneId, prefix and requestInfo values. Shows the request schema, an example and provider prices.

AlibabaToken solves Alibaba Cloud CAPTCHA (Aliyun CAPTCHA) through your proxy and returns the verification tokens. It takes the page URL, the scene and prefix values, and optional session values. The server returns a CAPTCHA page after a suspicious action, such as a login attempt.

Use AlibabaTokenProxyLess when the site accepts a token solved from another address.

Proxy

task.proxy is required on this task type, and the provider solves from that address. Send the proxy you use for your own requests to the site, and keep one IP for the whole solve: see Keep the same IP for the whole solve.

Find the parameters

Several of these values are generated dynamically and can differ on every protected page load.

Open the site and perform the action that triggers the CAPTCHA, such as a login attempt. In the Network tab of DevTools, find the response that returns an HTML CAPTCHA page instead of the usual JSON.

Find the var requestInfo object in that page. It holds data, region, sceneId, token, traceid, type, userId and userUserId.

Map the fields. sceneId, userId, userUserId and region use the field of the same name. verifyType is the type field, and userCertifyId is the traceid field.

Find prefix, the subdomain of the CAPTCHA initialization request. For https://dlw3kug.captcha-open.example.aliyuncs.com/, the prefix is dlw3kug.

Find apiGetLib, the URL of the AliyunCaptcha.js script, in a script tag on the CAPTCHA page or in the Network tab.

Only websiteURL, sceneId and prefix are required. If requestInfo is missing or obfuscated, search the network requests for sceneId, CaptchaSceneId or sId.

Keep the token and traceid values from requestInfo as well. You need them when you resend the original request after the solve.

Use the tokens

The solution tokens is a JSON string with sceneId, certifyId, deviceToken and data. Send it with the request the CAPTCHA page blocked. To find the field that carries it, submit the form once in a browser with the DevTools Network tab open and find the request parameter that carries the tokens.

If the site rejects the tokens, check that the proxy kept one IP for the whole solve, then that the values come from the same page load.

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.80
Solverify
$0.20

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://www.example.com

sceneId*
stringYes

Captcha scenario identifier: the sceneId field of the requestInfo object on the captcha page. If the object is missing, search the network requests for sceneId, CaptchaSceneId or sId.

Example: abc123xyz4

prefix*
stringYes

Captcha initialization parameter: the subdomain of the captcha request URL, for example dlw3kug in https://dlw3kug.captcha-open.example.aliyuncs.com/.

Example: def456gh

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

userId
stringNo

Unique identifier of the user or session on the website side (userId field of requestInfo).

Example: Abc123Def456Ghi789Jkl012Mno345Pqr678Stu901=

userUserId
stringNo

Secondary user identifier (userUserId field of requestInfo).

Example: Xyz987Abc654Def321Ghi098Jkl765Mno432Pqr109=

verifyType
stringNo

Version or type of the captcha verification mechanism (type field of requestInfo).

Example: 1.0

region
stringNo

Region of the data center processing the captcha (region field of requestInfo), for example sgp.

Example: sgp

userCertifyId
stringNo

Verification ID linked to the current captcha session (traceid field of requestInfo).

Example: abc123def456ghi789jkl012mno345pq

apiGetLib
URLNo

Link to the AliyunCaptcha.js library the site loads. The page can generate it on every render.

Example: https://o.example.com/captcha-frontend/aliyunCaptcha/AliyunCaptcha.js?t=1234

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": "AlibabaToken",
        "websiteURL": "https://www.example.com",
        "sceneId": "abc123xyz4",
        "prefix": "def456gh",
        "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
tokens*
stringYes

JSON string with sceneId, certifyId, deviceToken and data, to submit to the target site.

Example: {"sceneId":"abc123xyz4","certifyId":"aBcDeF1234","deviceToken":"ABC_WEB#1234...xyz789=","data":"AbC123xYz...DeF456qWe789"}

raw*
Record<string, unknown>Yes

Raw provider response data for advanced use cases.