URL Scheme: This interface is used to obtain the scheme code of the mini program, and is suitable for business scenarios where mini programs are launched via text messages, emails, external web pages, WeChat, etc. Currently, it is only open to mini programs for domestic non-individual subjects. For details, see Obtaining URL Scheme.
URL Link: Get the mini program URL Link, suitable for business scenarios where mini programs are launched via text messages, emails, web pages, WeChat, etc. Currently, it is only open to mini programs for domestic non-individual subjects. For details, see Obtaining URL Link.
3. Call upper limit
Generation end: The total number of URL Scheme (encrypted plain text) and URL Link generated per day is capped at 500,000;
Open side: The total number of times a mini program can be opened through URL Scheme (encrypted plain text) and URL Link is capped at 3 million per day;
Starting from December 19, 2023, the URL Scheme restriction of one person per link will be cancelled, allowing the same connection to be accessed by multiple users. Detailed adjustment instructions can be found in the "URL Scheme and URL Link Optimization Announcement".
4. Other matters needing attention
4.1 URL Scheme
Encrypted URL Scheme supports developers to splice query parameters after the link. For details, see Obtaining URL Scheme;
If you need to open a mini program on a webpage in WeChat, please use the WeChat open tab - mini program jump button. If you don't have a public account, you can also directly use the mini program identity to develop web pages and jump to the mini program without authentication. See the cloud development static website jump mini program. program. Mini programs that meet the open scope can send text messages that support opening the mini program;
This function basically covers the WeChat version currently used by users, and developers do not need to be compatible with lower versions;
Only the URL Scheme of published applet can be generated;
When jumping to WeChat through URL Scheme, a system pop-up box may be triggered to ask. If the user chooses not to jump, the mini program cannot be opened. Developers are asked to properly handle scenarios where users choose not to jump;
Some browsers will restrict direct jump when opening a web page. You can refer to the sample web page to set the jump button.
4.2 URL Link
Encrypted URL Link supports developers to splice query parameters behind the link. For details, see Obtaining URL Link;
Only URL links for published mini programs can be generated;
When opening the URL Link in WeChat or on an Android phone, the official H5 intermediate page will be redirected first by default. If you need to customize H5 content, you can use the cloud to develop a static website.
URL Scheme: The interface method is: openapi.urlscheme.generate;
URL Link: The interface method is: openapi.urllink.generate.
5.3 Third-party calls
1. URL Scheme
The calling method and incoming and outgoing parameters are the same as HTTPS, only the calling token is different;
The permission set IDs to which this interface belongs are: 88, 115;
After the service provider obtains authorization from one of the permission sets, it can use authorizer_access_token to make calls on behalf of the merchant.
2. URL Link
The calling method and incoming and outgoing parameters are the same as HTTPS, only the calling token is different;
The permission set IDs to which this interface belongs are: 88, 115;
After the service provider obtains authorization from one of the permission sets, it can use authorizer_access_token to make calls on behalf of the merchant.
6. Request parameters
6.1 URL Scheme
Parameter Description
Attributes
type
default value
Required
illustrate
access_token
string
yes
Interface call credentials
jump_what
Object
no
Information about the target applet to jump to.
expire_time
number
no
The expiration time of the expired scheme code is the Unix timestamp. The generated expiration scheme code is valid before this time. The maximum validity period is 30 days. Required when is_expire is true and expire_type is 0
The number of days between expiration of expired scheme codes. The generated expiration scheme code is valid until the interval is reached. The maximum interval is 30 days. Required when is_expire is true and expire_type is 1.
jump_wxa Description
Attributes
type
default value
Required
illustrate
path
string
no
The mini program page path entered through the scheme code must be a page where a published mini program exists, and queries cannot be carried. When path is empty, it will jump to the mini program homepage.
query
string
no
The query when entering the mini program through the scheme code has a maximum length of 1024 characters. It only supports numbers, uppercase and lowercase English and some special characters: !#$&'()*+,/:;=?@-._~%`
env_version
string
no
Default value is "release". The version of the applet to open. The official version is "release", the experience version is "trial", and the development version is "develop", which only takes effect when opened outside WeChat.
6.2 URL Link
Parameter Description
Attributes
type
default value
Required
illustrate
access_token
string
yes
Interface call credentials
path
string
no
The mini program page path entered through URL Link must be a page where a published mini program exists, and query cannot be carried. When path is empty, it will jump to the mini program home page.
query
string
no
The query when entering the mini program through URL Link has a maximum length of 1024 characters. It only supports numbers, uppercase and lowercase English and some special characters: !#$&'()*+,/:;=?@-._~%
expire_time
number
no
The expiration time of the expired URL Link is the Unix timestamp. The generated expired URL Link is valid before this time. The maximum validity period is 30 days. expire_type is 0 required
expire_type
number
no
Default value 0. Mini Program URL Link expiration type, expiration time: 0, expiration interval days: 1
expire_interval
number
no
The number of days between expiration of the expired URL Link. The generated expired URL Link is valid before the interval is reached. The maximum interval is 30 days. expire_type is 1 required
cloud_base
object
no
The cloud-developed static website customizes H5 configuration parameters and can configure the transferred cloud-developed H5 page. If left blank, the official H5 page will be used by default.
env_version
string
no
Default value is "release". The version of the applet to open. The official version is "release", the experience version is "trial", and the development version is "develop", which only takes effect when opened outside WeChat.
cloud_base description
Attributes
type
default value
Required
illustrate
env
string
yes
Cloud development environment
domain
string
no
Custom domain name for static website. If left blank, the default domain name will be used.
path
string
no
Cloud development static website H5 page path, query cannot be carried
query
string
no
Cloud development static website H5 page query parameters, maximum 1024 characters, only supports numbers, uppercase and lowercase English and some special characters: !#$&'()*+,/:;=?@-._~%`
resource_appid
string
no
Required for third-party batch cloud development, indicating the appid of creating the env (mini program/third-party platform)
7. Attention
The url_link returned by part of the URL Link will be intercepted by QQ Browser! ! ! , so I still use URL Scheme for now! ! !