tencent cloud

Tencent Cloud Super App as a Service

Release Notes and Announcements
Announcement: Tencent Cloud Mini Program Platform Renamed to Tencent Cloud Super App as a Service on January 2, 2025
Console Updates
Android SDK Updates
iOS SDK Updates
Flutter SDK Updates
IDE Updates
Base Library Updates
Product Introduction
Overview
Strengths
Use Cases
Purchase Guide
Billing Overview
Pay-As-You-Go Billing
Renewal Guide
Service Suspension Instructions
Getting Started
Plan Management
Overview
Console Account Management
Storage Configuration
Acceleration Configuration
Branding Configurations
Platform Features
Console Login
Users and Permission System
Mini Program Management
Mini Game Management
Superapp Management
Commercialization
Platform Management
User Management
Team Management
Operations Management
Security Center
Code Integration Guide
Getting Demo and SDK
Android
iOS
Flutter
Superapp Server
GUID Generation Rules
Mini Program Development Guide
Mini Program Introduction and Development Environment
Mini Program Code Composition
Guide
Framework
Components
API
Server Backend
JS SDK
Base Library
IDE Operation Instructions
Mini Game Development Guide
Guide
API
Server Backend
Practice Tutorial
Mini Program Login Practical Tutorial
Mini Program Subscription Message Practical Tutorial
Payment Practical Tutorial
Ad Integration Practical Tutorial
Mini Game Subscription Message Practical Tutorial
API Documentation
History
Introduction
API Category
Making API Requests
Operation Management APIs
User Management APIs
Team Management APIs
Sensitive API-Related APIs
Role Management APIs
Platform Management APIs
Other Console APIs
Mini Program or Mini Game APIs
Management-Sensitive APIs
Global Domain Management APIs
Superapp APIs
Data Types
Agreements
Service Level Agreement
Data Processing and Security Agreement
SDK Privacy Policy Module
SDK Data Processing and Security Agreement Module

Network

PDF
Focus Mode
Font Size
Last updated: 2026-02-11 11:51:57
Note:
When using web-related APIs in Mini Programs/Mini Games, developers should note the following issues in advance.

Configuration of Server Domain Name

Each mini program needs to set a communication domain name in advance, and the mini program can only communicate with the specified domain name. This includes normal HTTPS requests (wx.request), uploading files (wx.uploadFile), downloading files (wx.downloadFile) and WebSocket communication (wx.connectSocket), UDP communication (wx.createUDPSocket), TCP communication (wx.createTCPSocket).
The network interface only allows communication with non-local IPs and configured server domains on the same LAN.

Configuration process

Configure the server domain name in Mini Program Console > Settings > Development Settings > Server Domain Name. Configuration notes:
The domain name supports the HTTPS (wx.request, wx.uploadFile,wx.downloadFile) protocol, the WSS (wx.connectSocket) protocol, and the TCP and UDP protocols;
The domain name cannot use an IP address or localhost.
Ports cannot be configured in the domain (e.g., http://miniApp.com), but the request URL can include a port, such as http://miniApp.com:8080.
For WSS domains, there is no need to configure a port; requests to all ports under that domain are allowed by default.
Configuring a parent domain is not supported, please use a subdomain instead.

Network Request

Timeout

The default timeout and maximum timeout are both 60s;
The timeout can be configured in app.json;
It is also possible to specify a timeout when the interface is called, e.g. wx.request({ timeout: 5000 }) in ms. The timeout configuration for the interface call takes precedence over the configuration in app.json.

Use Limits

The referer header of a network request is optional. Its format is always https://appservice.qq.com/{appid}/{version}/page-frame.html, in which {appid} is the Mini Program's appid and {version} is the version number of the Mini Program. A version number of 0 means it is a developer version, trial version, or review version. A version number of devtools means it is the Weixin DevTools. Those with a version number other than the above ones are formal versions;
The maximum concurrency of wx.request, wx.uploadFile,wx.downloadFile is 10;
The maximum concurrency limit for wx.connectSocket is 5;
When the Mini Program is running in the background, if a network request does not end within 5s, an error message of fail interrupted will be called back. The network request API cannot be called until the Mini Program client is re-opened.

Return value encoding

The values returned by the server should be UTF-8 encoded. The Mini Program will try to convert non-UTF-8 encoded return values but may fail;
The Mini Program automatically filters the BOM header (only one BOM header is filtered).

Callback function

As long as the value returned by the server is received, the success callback is triggered regardless of statusCode. Determine the return value based on the business logic.

FAQs

HTTPS certificate

Mini Programs must use HTTPS/WSS to initiate a network request. During the request, the system verifies the HTTPS certificate used by the server domain name. If the verification fails, the request is not successfully initiated. Due to system limitations, different platforms have different levels of stringency for certificates. To ensure the compatibility of Mini Programs, we recommend that developers configure the certificate according to the highest standard and use the relevant tools to check whether the existing certificate meets the requirements.
The requirements for certificates are as follows:
The HTTPS certificate must be valid;
Use a trusted certificate, i.e., the root certificate has been built into the system;
The domain name of the website where the SSL certificate is deployed must be the same as the domain name for which the certificate was issued;
The certificate must not have expired;
The certificate's trust chain must be complete (server configuration is required);
Self-signed certificates are not supported for iOS;
Certificates in iOS must meet Apple's App Transport Security (ATS) requirements;
TLS 1.2 or above is required. However, TLS 1.2 is not supported on some older Android models, so make sure HTTPS server supports TLS 1.1 or below;
Some CAs may not be trusted by the operating system. Take note of the announcements of the Mini Program and other systems when selecting certificates.
Note:
The validity of the certificate can be verified using the openssl s_client -connect example.com:443 command, or you can use other online tools;
In addition to the web request API, if there is any abnormality in other HTTPS requests in the mini program, please check it according to the above process. For example, https images can't be loaded, audio and video can't be played, and so on.

Skip domain name verification

In the Weixin DevTools, the Do not verify the request domain name, TLS version, and HTTPS certificate in development environment option can be enabled to skip verification of the server domain name. In this case, the server domain name will not be verified in the Weixin DevTools or when debugging mode is enabled on your phone.
After the server domain name is configured, we recommend you disable this option during development and test the domain name on each platform to ensure it is correct.
Note:
If you see the phenomenon of "can send request with debugging mode on, can't send request with debugging mode off" on your mobile phone, please make sure that the domain name verification has been skipped, and make sure that the server domain name and certificate configuration are correct.
If you encounter "internal server error", please try the following methods to check yourself ① Change the browser ② Refresh the web page ③ Check whether the file is placed in the correct server root directory. Checking method: Splicing the URL according to the following rules, and try to access whether it is successful or not: https://m.da9c.cn/Filename.

Help and Support

Was this page helpful?

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

Feedback