Mini games are a special type of mini program that can be played instantly without downloading, installing, or uninstalling.
From version 2.2.0, the Exclusive and Enterprise plans support the beta version of mini game features. You can develop, manage, and publish mini games using the developer tools and console.
Prerequisites
The mini game feature is currently available through a allowlist. Contact the product team to discuss your needs and enable it.
Mini game development guide
Mini game console operations
Create a mini game
1. Navigate to Mini game management - Mini games, and Click Create mini game.
2. Fill in the mini game information, including:
Mini game name: Required. It supports 3-64 characters including uppercase and lowercase letters, numbers, spaces, and certain special characters ("+", "=", ",", ".", "@", "-", "_").
Mini game category: Required. Select an appropriate category for the mini game.
Mini game description: Required. Provide a description of the mini game, including gameplay, features, etc.
Mini game logo: Optional. Upload a square image in jpg or png format, up to 2 MB. If no logo is uploaded, the system default logo will be used.
Click Next. The mini game is now successfully created. If this is your first time creating a mini game, follow the instructions in step two to download and install the developer tools.
Development management
Development management includes setting domain names, applying for sensitive API permissions, querying real-time logs, and more.
Domain management
To ensure the security of super app and its users, mini games must pre-configure backend communication domain names and can only communicate with specified domains.
Click Add domain name and enter the domain information, including regular HTTPS requests (wx.request), file uploads (wx.uploadFile), file downloads (wx.downloadFile), and WebSocket communication (wx.connectSocket). Embedding webpages in a mini game is supported (H5 page) to facilitate flexible configuration of the mini game.
If the mini game business is complex and domain names are difficult to configure comprehensively (e.g., dynamic ad request domains), the mini game can request to skip domain verification. After approval, domain settings are no longer required. Click Skip domain verification, fill in the reason for the application, read and agree to the security agreement, and submit the application.
API permissions
When sensitive APIs are configured for the host app, permissions must be obtained from the host app to call the sensitive APIs. The mini game can only call these sensitive APIs after approval from the host app's administrator or approver.
Apply:
Request permissions: Apply for permission to use sensitive APIs from the app.
Real-time logs
Filters: Time, log level (All, Info and above, Warn and above, Error and above), system type, GUID, page link, filterMsg content, base library version, and client version.
Key management
AppSecret (the mini game key) is essential for authentication in important processes such as mini game login. Only mini program team administrators have the authority to view and manage the keys. They can generate, reset, and freeze keys in the key management section.
How to use:
Generate
After clicking Generate, the mini program team admin needs to copy the key and securely save the key. Once the popup is closed, the key cannot be copied again. If the key is forgotten, it must be reset. The platform does not display or save the key in plain text.
Reset
The mini program team admin can reset the key. After you confirm to reset the AppSecret, the mini game features using the original AppSecret cannot work properly, so please update it promptly.
Freeze
To ensure the mini game service's security, if the key is leaked or suspected to be leaked and has not yet been replaced, developers should freeze the key to prevent any security incidents.
The mini program team admin can click Freeze to freeze the key. After that, the mini game features using the original AppSecret will not work properly, so please update it promptly.
Version management
Mini game version management provides lifecycle management for mini games.
Version definition
Development version
After the developer submits the version of the mini game through the developer tool, a development version is generated in the Development version section on the Version management page. Click Submit for approval on the right to submit the mini game to the app for approval.
Version for approval
When a version is under approval, it is displayed in the section of Version approval progress. After it is approved, you can click Release to release the version.
Online version
The latest version of the mini game which has been released on the app is shown in this section. Click Download QR code on the right to download the QR code of the mini game, and then you can scan the QR code to open the mini game with the host app.
Note
1. A developer can submit multiple development versions.
2. Different developers submitting development versions with the same version number will result in two versions with the same number under Version management - Development version.
3. The version number submitted for approval must be greater than the online version number and cannot use previously released version numbers.
4. After a version is released, the corresponding version number will be removed from the list of development versions.
Other features and operations
Mini game offline package
You can build a mini game into the host app with the mini game offline package. Download the mini game package from the console, import it into the host app project, and pack it together with the app. Users can open the embedded mini game without downloading it from the backend, even without an internet connection.
Directions
1. Download the mini game offline package.
2. Copy the downloaded mini game package to the custom assets directory. You need to strictly follow the naming rules for offline mini games.
Note:
Naming rules for offline mini games: {miniAppId}_{miniAppVersion}.apkg
3. In the SDK initialization configuration, specify the asset directory where the offline mini game was placed in the previous step.
Note
Offline mini games must go through the normal releasing process. Only the offline packages of online versions of mini games can be downloaded.
Offline mini games follow the same version management rules as online versions, including new releases, version rollbacks, and removal. If the online version differs from the pre-installed version, the client will fetch the online version.
If a mini game is removed from the app, the corresponding offline mini game embedded in the App will also not be available.
Mini game version rollback
The online version of a mini game can be rolled back to a previously released version. However, continuous rollback is not supported.
Mini game removal
Click Remove to remove a mini game from the app. After that, the mini game can not be searched, and the cached mini game can not be opened.
Settings
Configure the user privacy protection policy in the settings. Use the provided template to fill in the personal data collected by the mini game. After saving, the user privacy protection policy will be generated.
1. Click Update.
2. Fill in the privacy information.
Once saved, the user privacy protection policy can be viewed under More - Mini game details.