Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to generate Mini Program QR Code

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "how to generate Mini Program QR code". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Official QR code

View Mini Program's official QR code in Settings, which is only used to access the official online version of Mini Program.

QR code with parameters

The QR code with parameters is obtained through the interface. A maximum of 10000 QR codes with parameters can be generated. Please call it carefully.

Get the QR code of Mini Program page

The QR code of any page of Mini Program can be obtained through the background interface. Scanning the QR code can directly enter the corresponding page of Mini Program.

Get Mini Program Code

Interface address: https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN

POST parameter description the default value of the parameter type indicates that pathString cannot be empty, and the width of the maximum length 128byte widthInt430 QR code auth_colorBoolfalse automatically configures the line color. If the color is still black, it is not recommended to configure the main tone line_colorObject {"r": "0", "g": "0", "b": "0"} when auth_color is false. Use rgb to set colors such as {"r": "xxx", "g": "xxx", "b": "xxx"} to get ordinary QR codes

Interface address: https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=ACCESS_TOKEN

POST parameter description parameter type default value indicates that pathString cannot be empty, with a maximum length of 128byte widthInt430 QR code width

Example:

{"path": "pages/index?query=1", "width": 430}

Note: pages/index needs to be defined in the pages of app.json

Bug & Tip

Tip: through this API, only the QR codes of the published Mini Program can be generated.

Tip: you can generate the development version of the QR code with parameters when the developer tool previews.

Tip: there are only 100000 QR codes with parameters. Please call them carefully.

The tip: POST parameter needs to be converted to a json string, and form form submission is not supported.

Tip: the auth_color line_color parameter is only valid for Mini codes

This is the end of the content of "how to generate Mini Program QR Code". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report