WeChat authentication event push
WeChat authentication event push
In order to help public account developers obtain the certification status of their public accounts, and for third-party platform developers to obtain the certification status of their public accounts, WeChat The public platform provides event push at each stage of the public account certification process.
Where are events pushed to?
1. The event push will be pushed to the public account in the service address set in the developer center of the official website of the public platform.
2. If the public account has set the account management permissions (because the interface permissions are subordinate to the account Management permission set) is authorized to a third-party platform, then the third-party platform will receive event push on behalf of the official account, specifically the official account message and event reception URL
# pushed to the third-party platform
2. After the name authentication is successful , the official account has obtained the check mark certification mark
in the WeChat client
1 Qualification authentication is successful (the interface permission is obtained immediately)
2 Qualification authentication fails
3 Name authentication is successful (that is, naming is successful)
4 Name authentication fails (Although the client does not check the box at this time, it still has interface permissions)
5 Annual Review Notice
6 Certification Expiration Notification
Qualification authentication is successful (the interface permission is obtained immediately)
Push XML data packet example:
<xml><ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1442401156</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[qualification_verify_success]]></Event>
<ExpiredTime>1442401156</ExpiredTime>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type qualification_verify_success |
ExpiredTime | Validity period (integer), refers to the timestamp, which will be the timestamp Certification expired |
推送XML数据包示例:
<xml><ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1442401156</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[qualification_verify_fail]]></Event>
<FailTime>1442401122</FailTime>
<FailReason><![CDATA[by time]]></FailReason>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type qualification_verify_fail |
FailTime | Failure occurrence time (shaped), timestamp |
FailReason | Reason for authentication failure |
Name authentication is successful (that is, naming is successful)
Push XML data Package example:
<xml><ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]> ;</FromUserName>
<CreateTime>1442401093</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event>< ![CDATA[naming_verify_success]]></Event>
<ExpiredTime>1442401093</ExpiredTime>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type naming_verify_success |
ExpiredTime | Validity period (integer), refers to the timestamp, and will expire at this timestamp Certification expired |
Name authentication failed (at this time, although the client does not check the box, it still has interface permissions)
Push XML data packet Example:
<xml><ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]> </FromUserName>
<CreateTime>1442401061</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><! [CDATA[naming_verify_fail]]></Event>
<FailTime>1442401061</FailTime>
<FailReason><![CDATA[by time]]></FailReason>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type naming_verify_fail |
FailTime | Failure occurrence time (shaped), timestamp |
FailReason | Reason for authentication failure |
推送XML数据包示例:
<xml><ToUserName><![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1442401004</CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[annual_renew]]></Event>
<ExpiredTime>1442401004</ExpiredTime>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type annual_renew, reminding the public account that it needs to be reviewed last year |
ExpiredTime | Expiration period (plastic), refers to Timestamp, the certification will expire at this timestamp, and annual review is required as soon as possible |
Authentication expiration and invalidation notification
Push XML packet example:
<xml><ToUserName> ;<![CDATA[toUser]]></ToUserName>
<FromUserName><![CDATA[fromUser]]></FromUserName>
<CreateTime>1442400900</ CreateTime>
<MsgType><![CDATA[event]]></MsgType>
<Event><![CDATA[verify_expired]]></Event>
<ExpiredTime>1442400900</ExpiredTime>
</xml>
Parameter description
Parameter | Description |
---|---|
ToUserName | DeveloperWeChat ID |
FromUserName | Sender account (an OpenID, the sender is the system account at this time) |
CreateTime | Message creation time (integer), timestamp |
MsgType | Message type, event |
Event | Event type verify_expired |
ExpiredTime | Expiration period (integer), refers to the timestamp, indicating that it has expired at that time The stamp authentication has expired and WeChat authentication needs to be reinitiated |