Tools Tags
directory
Tools Tags
receive normal messages
Receive ordinary messages
##When ordinary WeChat users send messages to public accounts, The WeChat server packages the XML data of the POST message to the URL filled in by the developer.
Please note:The push XML data packet structure of each message type is as follows:
Text message
| ##<xml> <ToUserName><![CDATA[toUser]]></ToUserName> |

Use web debugging tools to debug this interface
Picture message<xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[fromUser]]></FromUserName> <CreateTime>1357290913</CreateTime> <MsgType><![CDATA[voice]]></MsgType> <MediaId><![CDATA[media_id]]></MediaId> <Format><![CDATA[Format]]></Format> <MsgId>1234567890123456</MsgId> </xml> |

Use web debugging tools to debug this interface
Please note that after enabling speech recognition, every time a user sends a voice message to an official account, WeChat will add a Recongnition field to the pushed voice message XML packet (Note: Due to client caching, developers may enable or disable speech recognition. The function takes effect immediately for new followers and takes 24 hours for already followed users. Developers can re-follow this account for testing). The voice XML data packet after enabling speech recognition is as follows:
<xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[fromUser]]></FromUserName> <CreateTime>1357290913</CreateTime> <MsgType><![CDATA[voice]]></MsgType> <MediaId><![CDATA[media_id]]></MediaId> <Format><![CDATA[Format]]></Format> <Recognition><![CDATA[腾讯微信团队]]></Recognition> <MsgId>1234567890123456</MsgId> </xml> |
Parameter description:
Video message

Use web debugging tools to debug this interface
Small video message
Use web debugging tools to debug this interface
Geolocation message<xml> <ToUserName><![CDATA[toUser]]></ToUserName> <FromUserName><![CDATA[fromUser]]></FromUserName> <CreateTime>1351776360</CreateTime> <MsgType><![CDATA[link]]></MsgType> <Title><![CDATA[公众平台官网链接]]></Title> <Description><![CDATA[公众平台官网链接]]></Description> <Url><![CDATA[url]]></Url> <MsgId>1234567890123456</MsgId> </xml> |

Use web debugging tools to debug this interface

Hot AI Tools
Undress images for free
Online AI tool for removing clothes from photos.
AI-powered app for creating realistic nude photos
AI image generator for creative art from text prompts.
AI powered investment research for smarter decisions
Hot Article
Hot Topics
20516
7
13629
4
Popular tool
Easy-to-use and free code editor
Chinese version, very easy to use
Powerful PHP integrated development environment
Visual web development tools
God-level code editing software (SublimeText3)















![Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum]](https://img.php.cn/upload/course/000/000/035/5d27fb58823dc974.jpg)