# Obtain URL Scheme

since 2023 year 12 month 19 From then on, the URL Scheme to upgrade, detailed adjustment instructions can be seen《URL Scheme and URL Link Optimization BulletinAn overview of the change points is as follows:

1. Support developers in the original encryption URL Scheme Back splicing parameter

2. New text URL Scheme, developers do not need to call the interface to generate their own splicing plaintext Scheme

3. cancel URL Scheme One person, one chain limit, support the same connection to be accessed by multiple users

4. Every little thing every day. URL Scheme and URL Link The total number of openings is limited to 3 million

# encryption URL Scheme

# Way of getting

adopt[Server-side interface](https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/url-scheme/urlscheme.generate .html)You can get the encryption to open any page of the Mini Program URL Scheme。Suitable for opening Mini programs from text messages, emails, WeChat external web pages and other scenarios. adopt URL Scheme The scene value of the open Mini Program is 1065。
Generated URL Scheme As follows:

weixin://dl/business/?t= *TICKET*

The iOS system supports identification URL Scheme, can be used in SMS and other application scenarios directly through the Scheme jump Mini Program.
The Android system does not support direct identification URL Scheme, the user is unable to access the Scheme Open the Mini Program normally, the developer needs to use the H5 Page transfer, and then jump to Scheme Implementation to open the Mini Program, jump code example is as follows:

location.href = 'weixin: //dl/business/?t= *TICKET*'

The jump method can be opened by the user when the H5 Is called immediately, or after the user fires the event.

# Splicing parameter

The original URL Scheme Smooth upgrade to encryption URL Scheme, which supports developers to splice parameters after linksCUSTOM PARAMETE, after the splicing parameters URL Scheme As follows:

weixin://dl/business/?t= *TICKET*&cq=*CUSTOM PARAMETER*

Note:

  1. CUSTOM PARAMETEIs a special kind ofquery, maximum 256 characters, only supports numbers, upper and lower case English and some special characters:!#$&'()*+,/:=?@-._%`, Need url_Encode
  2. That have been generated prior to the commencement of this rule adjustment URL Scheme Can continue to be used normally and can be carried out directlyCUSTOM PARAMETEParameter splicing
  3. Encryption after splicing parameters URL Scheme The scene value of the open Mini Program is unchanged, it is still 1065。

# to state in writing URL Scheme

# Way of getting

The developer does not need to call the platform interface, in theMP Platform ->Setting ->Privacy and Security ->Clear Scheme pull up this Mini ProgramAfter declaration, you can concatenate parameters such as appid and path according to the following format URL Scheme Link.

weixin://dl/business/?appid= *APPID*&path=*PATH*&query=*QUERY*&env _version=*ENV_VERSION*

The parameters are defined as follows:

  1. [Required] APPID: via plaintext URL Scheme Open the Mini Program. appid
  2. [Required] PATH: Via plaintext URL Scheme Open the page of the Mini Program path , must be a page where a published Mini Program exists and cannot be carried query
  3. [Optional] QUERY: Through plaintext URL Scheme Open the Mini Program. query , maximum 512 characters, only supports numbers, upper and lower case English and some special characters:!#$&'()*+,/:=?@-._%`, Need url_Encode
  4. [Optional] ENV_VERSION: The version of the Mini Program to open, the official version isRelease, Experience Edition fortrial, Development Edition fordevelop, effective only when opened outside WeChat. Note: If you do not fill in, the default open the official version of the Mini Program.

By plaintext URL Scheme The scene value of the open Mini Program is 1286。

# Frequency limitation

Generation: Generation every day Encrypted URL Scheme and URL Link The total number is capped at 500 thousand

Open End: Every day through URL Scheme (encryption + plaintext) and URL Link The total number of times you can open the Mini Program is limited to 3 million.

# Note

  1. If you need to open the mini program, please useWeChat Open Label - Mini Program Jump Button, without an Official Account message template, you can directly use the identity of the Mini Program to develop web pages and jump the Mini Program without authentication. See[Cloud Development Static Website Jump Mini Program](https://developers.weixin.qq.com/miniprogram/dev/wxcloud /Guide/staticstorage/jump-miniprogram.html)Small programs that meet the Open Scope can[Send short messages that support opening Mini Programs](https://developers.weixin.qq.com/miniprogram/dev/wxcloud /Guide/staticstorage/msg-miniprogram .html)
  2. This feature basically covers the current version of WeChat users are using, and developers do not need to carry out low version compatibility.
  3. That can only be generated by a published Mini Program URL Scheme
  4. adopt URL Scheme Jump to WeChat, may trigger the system box inquiry, if the user chooses not to jump, you can not open the Mini Program. Ask developers to properly handle scenarios where users choose not to jump
  5. Some browsers will limit the opening of the page directly to the jump, please refer to the sample page to set the jump button
  6. The platform has a security policy to prevent the developer's link from being opened in batches by black ash production, resulting in the problem of reaching the access limit and not being able to properly open the Mini Program.

# Open Range

It is open to the non-personal subject Mini Program.

# sample code

Example of the use of cloud development of static web hosting to build web pages, without the Official Account message template, just ready to open a Mini Program and cloud development. The page will judge the environment to decide which way to jump, such as detected in the WeChat client, the use of open tag jump, such as detected in the external browser or App, then use the URL Scheme Jump Mini Program.

Sample web page address: https://postpay-2g5hm2oxbbb721a4-1258211818.tcloudbaseapp.com /jump-mp.html

Detailed code examples and instructions:[Cloud Development Static Website Jump Mini Program](https://developers.weixin.qq.com/miniprogram/dev/wxcloud /Guide/staticstorage/jump-miniprogram.html)。