Captcha bypass tutorials

Was this helpful?

How to solve Tencent captcha on hjd2048.com

Kate Push

Technical engineer

Introduction

This guide is for developers who are integrating Tencent captcha bypass (QCloud Captcha, Turing Captcha) via the 2Captcha API. We will cover the request structure, required parameters, and provide working JSON examples for the site hjd2048.com.

What you will need:

  • API key from 2Captcha
  • appId value from the target site
  • Full URL of the page with the captcha
  • If needed, a link to the captcha script captchaScript

1. About Tencent Captcha

1.1. Technology Overview

Tencent Captcha is a tokenized protection system that uses interactive tasks: slider puzzle, point selection, or simple verification. After successful solving, the server returns a token (ticket + randstr) that must be passed to the form or request to the target site.

1.2. Task Types

Task Type Description When to Use
TencentTaskProxyless Solving via 2Captcha proxy pool For most cases when the site does not block data center IPs
TencentTask Solving with your own proxy If the site requires residential or geo-localized IPs

1.3. Required and Optional Parameters

Parameter Type Required Description Example
type String Yes Task type: TencentTaskProxyless or TencentTask TencentTaskProxyless
websiteURL String Yes Full URL of the page with the captcha https://hjd2048.com/2048/
appId String Yes Application identifier from the source code 189997505
captchaScript String No Link to the captcha JS script (for non-standard implementations) https://global.captcha.gtimg.com/TCaptcha-global.js

2. Data Preparation

2.1. Getting the appId

  1. Open the target page in your browser
  2. Press F12, go to the Elements tab
  3. Find the element with attribute data-aid or appId:
html Copy
<div id="tcaptcha-widget" data-aid="189997505"></div>

The value 189997505 is your appId.

2.2. Finding captchaScript (if needed)

If the standard request returns ERROR_CAPTCHA_UNSOLVABLE, add the captchaScript parameter:

  1. In DevTools, open the Network tab
  2. Refresh the page, apply the captcha filter
  3. Find the request to cap_union_prehandle or loading of a .js file
  4. Copy the full script URL, for example:
Copy
https://global.captcha.gtimg.com/TCaptcha-global.js

3. Building the Request

3.1. API Endpoints

Method Endpoint Purpose
createTask https://api.2captcha.com/createTask Create a captcha solving task
getTaskResult https://api.2captcha.com/getTaskResult Get result by task ID

3.2. Example Request for hjd2048.com (TencentTaskProxyless)

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "TencentTaskProxyless",
    "appId": "189997505",
    "websiteURL": "https://hjd2048.com/2048/",
    "captchaScript": "https://global.captcha.gtimg.com/TCaptcha-global.js"
  }
}

3.3. Example Request with Proxy (TencentTask)

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "TencentTask",
    "appId": "189997505",
    "websiteURL": "https://hjd2048.com/2048/",
    "captchaScript": "https://global.captcha.gtimg.com/TCaptcha-global.js",
    "proxyType": "http",
    "proxyAddress": "1.2.3.4",
    "proxyPort": 8080,
    "proxyLogin": "user23",
    "proxyPassword": "p4$w0rd"
  }
}

4. Getting and Using the Result

4.1. Requesting the Result

Send a POST request to https://api.2captcha.com/getTaskResult:

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "taskId": 74455221488
}

4.2. Example Successful Response

json Copy
{
  "errorId": 0,
  "status": "ready",
  "solution": {
    "appid": "189997505",
    "ret": 0,
    "ticket": "tr0344YjJASGmJGtohyWS_y6tJKiqVPIdFgl87vWlVaQoueR8D6DH28go-i-VjeassM31SXO7D0*",
    "randstr": "@KVN"
  },
  "cost": "0.00299",
  "createTime": 1692863536,
  "endTime": 1692863556,
  "solveCount": 1
}

4.3. Applying the Token on the Target Site

The received ticket and randstr must be passed to the callback function defined during captcha initialization:

javascript Copy
// Example initialization on the target site
const myCallbackFunction = (token) => {
    // Token verification on the site backend
}
var captcha = new TencentCaptcha('189997505', myCallbackFunction, {});
captcha.show();

// After receiving the solution from 2Captcha:
let res = JSON.parse(apiResponse);
myCallbackFunction(res.solution);

If the site expects the token in a form, add hidden fields:

html Copy
<input type="hidden" name="ticket" value="tr0344...">
<input type="hidden" name="randstr" value="@KVN">

5. Alternative Methods

5.1. Coordinates Method for Point Selection Captchas

If the standard method does not work, use a task of type Coordinates:

json Copy
{
  "clientKey": "YOUR_API_KEY",
  "task": {
    "type": "Coordinates",
    "imageUrl": "https://ca.turing.captcha.qcloud.com/captcha-image.png",
    "question": "Click on the same animals"
  }
}

The response contains a string with coordinates:

json Copy
{
  "solution": {
    "coordinates": "150,200;300,150;450,300"
  }
}

5.2. Handling ERROR_CAPTCHA_UNSOLVABLE Error

Step Action
1 Make sure appId matches the target site
2 Add the captchaScript parameter with a current link
3 Try alternative links: https://ca.turing.captcha.qcloud.com/TCaptcha-global.js
4 Test a task of type TencentTask with a residential proxy

6. Common Errors

Error Cause Solution
ERROR_CAPTCHA_UNSOLVABLE Missing captchaScript for non-standard implementation Add the captchaScript parameter with the correct link
Token not accepted by site Incorrect ticket/randstr submission Check how the site expects to receive the token (via callback or form)
Wait timeout High load or complex captcha Increase polling interval or use a proxy
IP blocking Frequent requests without rotation Use task type TencentTask with your own proxy

6.1. Error Reporting

If the solution fails validation on the target site, send a report:

Incorrect solution:

Copy
GET https://api.2captcha.com/reportbad?key=YOUR_API_KEY&id=TASK_ID

Correct solution (must be sent together with reportbad):

Copy
GET https://api.2captcha.com/reportgood?key=YOUR_API_KEY&id=TASK_ID

7. Additional Resources


8. Checklist

  • API key obtained and verified from 2Captcha account dashboard
  • Correct appId extracted from the target page source code
  • Full websiteURL of the captcha page specified
  • For non-standard implementations, added captchaScript parameter
  • Suitable task type selected: TencentTaskProxyless or TencentTask
  • Request tested via sandbox or with a small budget
  • Logic for applying token (ticket + randstr) on target site implemented
  • Sending reportgood/reportbad configured for quality control

Conclusion

Tencent captcha requires accurate transmission of appId and websiteURL parameters. For non-standard implementations, it is critical to specify the captchaScript parameter, its absence often leads to the ERROR_CAPTCHA_UNSOLVABLE error.

Use task type TencentTaskProxyless for standard cases and TencentTask with proxy if the site uses geo-blocking. Pass the received token (ticket + randstr) to the callback function or to the target site form according to its documentation.

If problems occur, check the captcha script link for freshness and send reports via reportbad/reportgood if needed, this helps improve solution quality and get refunds for incorrect answers.