# 授权变更通知推送
当公众号/服务号/小程序/微信小店/带货助手/视频号助手对第三方平台进行授权、取消授权、更新授权后,微信服务器会向第三方平台方的授权事件接收 URL 以 POST 的方式推送相关通知。接收 POST 请求后,只需直接返回字符串 success。详情查看 消息推送文档。
# 字段说明
| 参数 | 类型 | 字段描述 |
|---|---|---|
| AppId | string | 第三方平台 appid |
| CreateTime | number | 时间戳 |
| InfoType | string | 通知类型 |
| AuthorizerAppid | string | 授权账号的 appid |
| AuthorizationCode | string | 授权码 |
| AuthorizationCodeExpiredTime | number | 授权码过期时间 |
| PreAuthCode | string | 预授权码 |
# InfoType 说明
| type | 说明 |
|---|---|
| unauthorized | 取消授权 |
| updateauthorized | 更新授权 |
| authorized | 授权成功 |
推送内容解密后的示例:
# 授权成功通知
<xml>
<AppId>第三方平台appid</AppId>
<CreateTime>1413192760</CreateTime>
<InfoType>authorized</InfoType>
<AuthorizerAppid>公众号appid</AuthorizerAppid>
<AuthorizationCode>授权码</AuthorizationCode>
<AuthorizationCodeExpiredTime>过期时间</AuthorizationCodeExpiredTime>
<PreAuthCode>预授权码</PreAuthCode>
<xml>
# 取消授权通知
<xml>
<AppId>第三方平台appid</AppId>
<CreateTime>1413192760</CreateTime>
<InfoType>unauthorized</InfoType>
<AuthorizerAppid>公众号appid</AuthorizerAppid>
</xml>
# 授权更新通知
补充说明:如果更新授权时,授权的权限集没有发生变化,将不会触发授权更新通知。
<xml>
<AppId>第三方平台appid</AppId>
<CreateTime>1413192760</CreateTime>
<InfoType>updateauthorized</InfoType>
<AuthorizerAppid>公众号appid</AuthorizerAppid>
<AuthorizationCode>授权码</AuthorizationCode>
<AuthorizationCodeExpiredTime>过期时间</AuthorizationCodeExpiredTime>
<PreAuthCode>预授权码</PreAuthCode>
<xml>