Publish a project as a WeChat Mini Program (video tutorial)
Open the tutorial in WeChat and follow it to configure the plugin, preview the Mini Program, and upload the package.
How the integration works
A WeChat Mini Program is a lightweight application that runs inside WeChat. Unlike a regular H5 page in a browser, it runs in WeChat’s container and can use supportedwx.* APIs.
With superun, you start from a published H5 project. The WeChat Mini Program plugin packages it in a Mini Program that uses the web-view component, then lets you preview and upload the package without opening WeChat DevTools.
What you need before setup
Prepare these items in the WeChat Official Accounts Platform:
The AppID identifies the Mini Program, the upload key authorizes package uploads, and the verification file authorizes the H5 domain used by
web-view.
1. Get the AppID
- Sign in to the WeChat Official Accounts Platform as an administrator.
- Open Development → Development Settings.
- Find Developer ID and copy the Mini Program AppID.
- Paste it into the WeChat Mini Program plugin settings in superun.
2. Generate the code-upload key
Only a Mini Program administrator can generate or reset this key.- In Development Settings, find Mini Program Code Upload.
- Select Generate. If an earlier key has been lost, select Reset; resetting immediately invalidates the old key.
- Save the downloaded
private.{appid}.keyfile. It is a PEM RSA private key and begins with-----BEGIN RSA PRIVATE KEY-----. - Upload the key in the superun plugin. Do not paste the private key into project chat or commit it to a repository.
Configure the IP allowlist
Add every outbound IP shown on the superun Mini Program plugin page to the IP allowlist in the same WeChat settings section. If the allowlist is missing or incomplete, WeChat may reject the upload with error40164.
The addresses above only demonstrate the required format. Always use the current IP list shown in superun.
3. Verify the business domain
- In Development Settings, find Business Domain and select Edit or Start configuration.
- Download the verification file, such as
MP_verify_AbCdEf123456.txt. - Place it at the public root of the H5 site. For example,
https://your-domain.example/MP_verify_AbCdEf123456.txtmust return the original file directly. - Enter only the host in WeChat—without a scheme or path—and save it.
The superun plugin shows the recommended business-domain value for the current project.
Preview and upload requirements
Preview and upload use two separate checks:
After both are configured:
- Select Preview on the plugin page to build the package and generate a QR code for testing in WeChat.
- Select Upload to send the package to the WeChat Official Accounts Platform. You can then manage testing and review from WeChat’s version management page.
Troubleshoot business-domain verification
If WeChat reports a verification failure or a temporary system error, check the following:- The verification URL is public, uses HTTPS, and is at the domain root.
- The filename, capitalization, extension, and contents are unchanged and contain no BOM, HTML, or added markup.
- SPA, CDN, or proxy rules do not rewrite the request to another page.
- The TLS certificate is valid and the endpoint is compatible with WeChat’s current TLS requirements.
- The file responds quickly and does not depend on a slow cold start.
- Domain capitalization and redirects match the business domains configured in WeChat.

