Current location - Quotes Website - Signature design - How to use the WeChat public platform message interface
How to use the WeChat public platform message interface

To apply for the message interface, click Apply, truthfully fill in the name of the person in charge, mobile phone number and email address, and fill in the URL and token. The token can be filled in by the developer arbitrarily and used to generate a signature.

After the URL is connected to the public platform and the user submits the information, we will request the filled-in Url in the form of a GET request, and bring four parameters: ?signature?—?WeChat encrypted signature; ?timestamp?— timestamp nonce—random number echostr—random string. Developers verify the legality of URL access by checking the signature.

Three message push When ordinary WeChat users send messages to public accounts, the public platform will POST the message to the filled-in Url (now supporting text messages and geographical location messages).

In the received POST packet, in addition to the sender/receiver information, time and other information:

Text messages will receive text content

Pictures , voice, and video will receive media IDs. Developers need to use "Upload and download multimedia files" in basic support to obtain media files

Geographical location information will receive geolocation longitude and latitude information

< p>The link message will receive the link address

Please note that event push will also be pushed to the URL filled in by the developer as a type of message, but the MsgType of event push is generally event.