Skip to content

Tencent

Tencent Captcha (also known as Tencent Tianyu or Tencent CAPTCHA) is a challenge system widely used on Chinese websites and applications powered by Tencent Cloud. It protects login forms, registration pages, and payment flows across major Chinese platforms. The challenge typically presents a slider puzzle or click-based verification and generates a verification token upon completion.

TypeProxy RequiredDescription
TencentTokenYesSolves the challenge using your proxy. Use when the target site performs IP-based validation.
TencentTokenProxyLessNoSolves the challenge without a proxy. Recommended for most use cases.
ParameterTypeRequiredDescription
typestringYesTencentToken or TencentTokenProxyLess
websiteURLstringYesThe URL of the page containing the Tencent Captcha
websiteKeystringYesThe app ID (also called captchaAppId or aid) found in the Tencent Captcha initialization code

Required when using the TencentToken type:

ParameterTypeRequiredDescription
proxyTypestringYeshttp, socks4, or socks5
proxyAddressstringYesProxy IP or hostname
proxyPortintegerYesProxy port
proxyLoginstringNoProxy username
proxyPasswordstringNoProxy password
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TencentTokenProxyLess",
"websiteURL": "https://example.cn/login",
"websiteKey": "2090451528"
}
}

With proxy:

{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TencentToken",
"websiteURL": "https://example.cn/login",
"websiteKey": "2090451528",
"proxyType": "http",
"proxyAddress": "1.2.3.4",
"proxyPort": 8080,
"proxyLogin": "user",
"proxyPassword": "pass"
}
}
{
"errorId": 0,
"taskId": "550e8400-e29b-41d4-a716-446655440000",
"status": "processing"
}
{
"token": "t03Cz6Mq0EQOUfh1..."
}
FieldTypeDescription
tokenstringThe Tencent Captcha verification token (ticket) to submit with the form or pass to the verification callback
  1. Find the Tencent Captcha app ID on the target page. It is typically in the JavaScript initialization as new TencentCaptcha('APP_ID', callback) or in the data-appid attribute of the widget element.
  2. Submit the task and poll for the solution.
  3. Use the returned token as the ticket parameter in the Tencent verification callback or include it in the form submission payload alongside the randstr if provided.
  4. Submit the form or API request with the verification token.
import requests
import time
API_KEY = "YOUR_API_KEY"
response = requests.post("https://api.ucaptcha.net/createTask", json={
"clientKey": API_KEY,
"task": {
"type": "TencentTokenProxyLess",
"websiteURL": "https://example.cn/login",
"websiteKey": "2090451528"
}
})
task_id = response.json()["taskId"]
while True:
result = requests.post("https://api.ucaptcha.net/getTaskResult", json={
"clientKey": API_KEY,
"taskId": task_id
}).json()
if result["status"] == "ready":
token = result["solution"]["token"]
print("Solution:", token)
# Use the token in your login request
login_data = {
"username": "user",
"password": "pass",
"captcha_ticket": token
}
response = requests.post("https://example.cn/login", data=login_data)
print("Status:", response.status_code)
break
elif result["status"] == "failed":
print("Error:", result.get("errorDescription"))
break
time.sleep(5)
const API_KEY = "YOUR_API_KEY";
const { taskId } = await fetch("https://api.ucaptcha.net/createTask", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
clientKey: API_KEY,
task: {
type: "TencentTokenProxyLess",
websiteURL: "https://example.cn/login",
websiteKey: "2090451528"
}
})
}).then(r => r.json());
while (true) {
const result = await fetch("https://api.ucaptcha.net/getTaskResult", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ clientKey: API_KEY, taskId })
}).then(r => r.json());
if (result.status === "ready") {
console.log("Solution:", result.solution.token);
break;
} else if (result.status === "failed") {
console.error("Error:", result.errorDescription);
break;
}
await new Promise(r => setTimeout(r, 5000));
}
Terminal window
# Create the task
curl -X POST https://api.ucaptcha.net/createTask \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TencentTokenProxyLess",
"websiteURL": "https://example.cn/login",
"websiteKey": "2090451528"
}
}'
# Poll for the result (replace TASK_ID with the returned taskId)
curl -X POST https://api.ucaptcha.net/getTaskResult \
-H "Content-Type: application/json" \
-d '{
"clientKey": "YOUR_API_KEY",
"taskId": "TASK_ID"
}'
  • 2Captcha
  • CapMonster

The following backward-compatible type names are also accepted:

AliasMaps To
CustomTask:TencentTencentTokenProxyLess