WeChat public account development WeChat message type analysis
In this article, let’s learn about the message type analysis of WeChat public account development
When an ordinary WeChat user sends a message to the public account, the WeChat server will POST the XML data packet of the message to the URL filled in by the developer. . The push XML data packet structure of each message type is as follows.
##Table of Contents[Hide]
|
<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1348831860</createtime>
<msgtype></msgtype>
<content></content>
<msgid>1234567890123456</msgid>
</xml>
ParameterToUserName | |
---|---|
WeChat ID | FromUserName |
CreateTime | |
MsgType | |
Content | |
MsgId | |
Use web debugging tool to debug this interface |
Picture message
<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1348831860</createtime>
<msgtype></msgtype>
<picurl></picurl>
<mediaid></mediaid>
<msgid>1234567890123456</msgid>
</xml>
ParametersToUserName | |
---|---|
WeChat ID | FromUserName |
CreateTime | |
MsgType | |
PicUrl | |
MediaId | |
MsgId | |
Use web debugging tool to debug this interface |
Voice message
<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1357290913</createtime>
<msgtype></msgtype>
<mediaid></mediaid>
<format></format>
<msgid>1234567890123456</msgid>
</xml>
ParametersToUserName | |
---|---|
WeChat ID | FromUserName |
CreateTime | |
MsgType | |
MediaId | |
Format | |
MsgID | |
Use web debugging tools to debug this interface |
Video message
<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1357290913</createtime>
<msgtype></msgtype>
<mediaid></mediaid>
<thumbmediaid></thumbmediaid>
<msgid>1234567890123456</msgid>
</xml>
ParametersToUserName | |
---|---|
微信 | FromUserName |
CreateTime | |
MsgType | |
MediaId | |
ThumbMediaId | |
MsgId | |
Use web debugging tool to debug this interface |
Geolocation message
<xml>
<tousername></tousername>
<fromusername></fromusername>
<createtime>1351776360</createtime>
<msgtype></msgtype>
<location_x>23.134521</location_x>
<location_y>113.358803</location_y>
<scale>20</scale>
<label></label>
<msgid>1234567890123456</msgid>
</xml>
ParametersToUserName | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
WeChat ID | FromUserName | |||||||||||||||||
CreateTime | ||||||||||||||||||
##MsgType | location | |||||||||||||||||
Location_X | Geolocation dimension | |||||||||||||||||
Location_Y | Geolocation accuracy | |||||||||||||||||
Scale | Map zoom size | |||||||||||||||||
Label | Geolocation information | |||||||||||||||||
MsgId | Message id, 64-bit integer type | |||||||||||||||||
参数 | 描述 |
---|---|
ToUserName | 接收方微信号 |
FromUserName | 发送方微信号,若为普通用户,则是一个OpenID |
CreateTime | 消息创建时间 |
MsgType | 消息类型,link |
Title | 消息标题 |
Description | 消息描述 |
Url | 消息链接 |
MsgId | 消息id,64位整型 |
使用网页调试工具调试该接口
The above is the detailed content of WeChat public account development WeChat message type analysis. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SublimeText3 Chinese version
Chinese version, very easy to use

Notepad++7.3.1
Easy-to-use and free code editor