tencent cloud

Captcha

Release Notes and Announcements
Release Notes
Product Announcement
Product Introduction
Overview
Advantages
Scenarios
Purchase Guide
Integration Guide
Client Integration
Server Integration
Integration with WAF Service Provider
JS Migration Guide
Operation Guide
Captcha Management
Captcha Statistics
API Documentation
History
Introduction
API Category
Making API Requests
Server APIs
Error Codes
Business Disaster Recovery Scheme
Business Disaster Recovery Scheme (Web and App)
FAQs
Billing
Feature
Integration
Agreements
Service Level Agreement
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

JS Migration Guide

PDF
Focus Mode
Font Size
Last updated: 2025-09-16 17:58:13

Customer Self-Check Current Integration Version

Check the client (frontend), search for the Captcha dynamic JS access address domain name, and compare the results shown below:
Captcha JS Access Domain Name
Web and App Client - H5 Integration
Whether Update Required
sg.captcha.qcloud.com
Web and App Client - H5 Integration Change Guidance
Update required
global.captcha.gtimg.com
Update required

Web and App Client - H5 Integration Change Guidance

1. Search globally for Captcha-related code and update the involved integration JS:
https://sg.captcha.qcloud.com/TCaptcha-global.js
Or
https://global.captcha.gtimg.com/TCaptcha-global.js
replace with:
https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js
2. For example only, detailed implementation depends on your code. Recommend global search and replace the above domain name.
 Before modification:
<html lang="en">
<head>
<script src="https://sg.captcha.qcloud.com/TCaptcha-global.js"></script>
</head>
<body></body>
<script>
// use tencent captcha sdk
var capctha = new TencentCaptcha("your appid", callback, {});
captcha.show();
</script>
</html>
After modification:
<html lang="en">
<head>
<script src="https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js"></script>
</head>
<body>
<!-- Container for package captcha -->
<div id="tcaptcha"></div>
</body>
<script>
// use tencent captcha sdk
var capctha = new TencentCaptcha(
document.getElementById("tcaptcha"),
"your appid",
callback,
{}
);
captcha.show();
</script>
</html>
3. Captcha integration parameter comparison
Parameter difference of new TencentCaptcha() during Captcha initialization see the table below:
Integration Version
Integration Version/Parameter Description
First Parameter
Second Parameter
Third Parameter
Fourth Parameter
Existing domain version
https://sg.captcha.qcloud.com/TCaptcha-global.js
AppId(String)
Callback(Function)
Options(Object)
-
New domain version
https://ca.turing.captcha.qcloud.com/TJNCaptcha-global.js
DOM(Element Nodes )
AppId(String)
Callback(Function)
1. Options(Object)
4. Execute pre-launch testing and save and publish.

Server-Side Ticket Validation Guide

1. Check server-side self-inspection ticket validation access status, global search integration host:
captcha.intl.tencentcloudapi.com
If the invoice verification fails for the host access, proceed to step 2 for integration guidance.
2. The server must call the ticket verification API to perform secondary verification on the client verification result. For the operation guide, please refer to Access Ticket Verification (Web & App).



Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback