Joke Collection Website - Blessing messages - How to push the official account template message of WeChat? The applet uses the official WeChat account template to push messages.

How to push the official account template message of WeChat? The applet uses the official WeChat account template to push messages.

The parameters of WeChat official account template message push interface emphasize: access_token: According to the access_token interface, appid and secret are used as parameters, but the access_token returned during authorization cannot be used, and the access_token returned during authorization is authorized. Note the difference between it and ordinary access_token. To obtain the interface template id of ordinary access_token, you need to apply for the push template of your own enterprise on WeChat. Template ID 1, template message entity class 2, access_token entity class 1, access_token acquisition method 2 and message push method will be generated successfully. The applet uses the official WeChat account template to push messages. Because applets can only send subscription messages, the message types are as follows: One-time subscription messages are used to solve the notification problem of subsequent service links after users use applets. After users subscribe independently, developers can send corresponding service messages indefinitely; Each message can be subscribed or unsubscribed separately. (Sending a message requires user authorization. You can authorize multiple email reminders at the same time, but you can only send them once. ) Long-term subscription message One subscription message can meet most of the service scenario requirements of applets, but there are scenarios that cannot be met by one subscription in the offline public service field, such as flight delay, so it is necessary to send message reminders several times in real time according to the flight. For the convenience of service, we provide long-term subscription messages. After the user subscribes once, the developer can send multiple messages for a long time. At present, long-term subscription to news is only open to the government and offline public services such as people's livelihood, medical care, transportation, finance and education. In the later stage, it will gradually support other offline public service businesses. (Even if you are in these industries, you need to apply to WeChat using the application template. ) 1. WeChat official account and applet need to obtain the same UnionID2 under the same WeChat open platform. If we need to add the entry of the applet in the message template, we need the official WeChat account to be associated with the applet. 3. Applets and official WeChat accounts must be authenticated. 4. The applet needs to know the appid and appsecret5 of the official WeChat account in advance. 5. Before sending the message, we need to get the openid of the user corresponding to the official WeChat account (this needs to be planned in advance). The official account of WeChat WeChat will publish a message restriction message template on 202 1-04-30, trying to make it the same pattern as the applet that subscribes to the message. I don't know what it will be. How to use the message template of WeChat public platform? Specific steps:

Apply to open the "template message" function. In order to ensure the user experience, at present, all official WeChat accounts with payment ability can use template messages for service. After the qualified service numbers log on to the WeChat public platform, you can see the function entry for applying for "template message" in the options of "Function"-"Add function plug-in". Click "Template Message" to apply and get permission to use it, and then you can start using it.

2. Confirm your industry and select an industry template. For the service number with template message enabled, you can directly see the "Template Message" option in the "Function" menu bar of the public platform, and click it to enter the template message interface. Wechat official account operators need to select the two industries where the account service is located, and then click the "+Add from Template Library" button to select the templates of these two industries from the template library for service notification.

3. At present, each public account with payment authority can use 10 templates for service at the same time, so hurry to the template library to find the message notification you want! View template details and manage My Templates. After adding a template message, enter My Template to view the details of the template message and delete management.

Extended reading:

Through the above three steps, you can open and use the template message function! Think about it. In the future, when you buy a movie, you will receive a WeChat message notice as soon as you pay the money, and this notice can also inform you of the movie name, price, viewing place, film review and rating at one time.