# 服务商代接收小程序违规处罚信息
- 当小程序存在违规行为时,平台会通过消息推送服务器通知给小程序开发者,建议小程序开发者注意及时接收相关通知进行排查整改,此通知不影响已有站内信等通知方式。
- 点击查看第三方平台消息与事件接收配置
# 注意事项
- 接收该通知,需要小程序将 76 的权限集授权给第三方平台;
# 1. 事件字段定义
# 1.1 Event 说明
字段【Event】等于"wxa_punish_event"时,则表示这是一条关于【小程序违规处罚事件】的通知。
属性 | 类型 | 说明 |
---|---|---|
Event | string | 事件名称:wxa_punish_event,即小程序违规处罚信息 |
event_type | number | 事件类型。1:警告;2:功能封禁;3:下架;4:账号封禁;10:页面封禁。 |
punish_id | string | 违规处罚ID,用于唯一标识每次违规 |
appid | string | 被处罚小程序的AppID |
punish_time | number | 违规时间(UNIX时间戳) |
illegal_reason | string | 违规原因 |
illegal_content | string | 违规内容 |
rule_name | string | 违反规则名称 |
rule_url | string | 违反规则链接 |
adjust_guide_url | string | 违规申诉及整改指引链接 |
detail | string | 违规处罚详情,字段内容为JSON字符串,JSON具体结构取决于event_type,请参照下方说明对该字段中包含的JSON字符串进行正确的解析 |
# 1.2 违规处罚事件详情(detail详细释义)
当event_type=1时detail中的JSON字符串结构如下:
属性 类型 说明 warned_type number 警告类型。1:警告账号封禁;2:警告功能封禁;3:警告下架。 rectify_deadline number 警告的截止时间(UNIX时间戳) warned_function_names array<string> 警告要封禁的功能项列表,如需获取列表中每个功能项的封禁时长,可直接在warned_ban_days的对应索引处获得,warned_function_names和warned_ban_days总是一一对应。(该字段仅当warned_type=2时生效) warned_ban_days array<number> 警告封禁的天数列表。当warned_type=1时则该列表仅有一项,代表警告要封禁小程序账号的天数。当warned_type=2时列表中的每一项分别代表warned_function_names中对应索引处的功能项被警告要封禁的天数。当warned_type=3时则该列表仅有一项,代表警告要下架小程序的天数。注:0代表永久封禁 当event_type=2时detail中的JSON字符串结构如下:
属性 类型 说明 banned_days array<number> 功能项被封禁的天数列表,列表中的每一项分别代表banned_function_names中对应索引处的功能项被封禁的天数。注:0代表永久封禁 banned_function_names array<string> 被封禁的功能项列表,如需获取列表中每个功能项的封禁时长,可直接在banned_days的对应索引处获得,banned_days和banned_function_names总是一一对应。 当event_type=3时detail中的JSON字符串结构如下:
属性 类型 说明 suspended_days number 下架天数。注:0代表永久下架 当event_type=4时detail中的JSON字符串结构如下:
属性 类型 说明 banned_days number 账号封禁天数。注:0代表永久封禁 当event_type=5时detail中的JSON字符串结构如下:
属性 类型 说明 path string 封禁的页面路径
# 2. 事件推送参数示例
event_type=1
- warned_type=1
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4i5LqBbWLVTfnhf-3TZ4BNk", "CreateTime": 1699803867, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "649557", "appid": "wx54a8eaa26606test", "punish_time": 1699803865, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "违规内容测试" ], "detail": "{\"warned_type\":1,\"rectify_deadline\":1699796571,\"warned_function_names\":[],\"warned_ban_days\":[3]}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 1 }
- warned_type=2
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4pIdqHZwh80SufyUuIzSenw", "CreateTime": 1699795665, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "649551", "appid": "wx54a8eaa26606test", "punish_time": 1699795663, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "违规内容测试" ], "detail": "{\"warned_type\":2,\"rectify_deadline\":1699796571,\"warned_function_names\":[\"分享朋友圈\",\"客服消息接口\"],\"warned_ban_days\":[1,1]}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 1 }
- warned_type=3
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4tGxCvPcXlKeFI5tU0jV_yw", "CreateTime": 1699795665, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "649551", "appid": "wx54a8eaa26606test", "punish_time": 1699795663, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "违规内容测试" ], "detail": "{\"warned_type\":3,\"rectify_deadline\":1699796571,\"warned_function_names\":[],\"warned_ban_days\":[1]}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 1 }
- warned_type=1
event_type=2
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4gSrT2S8jG2Ll1ZS16rwqQk", "CreateTime": 1699791600, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "13577492", "appid": "wx54a8eaa26606test", "punish_time": 1699791599, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "违规内容测试" ], "detail": "{\"banned_days\":[1,1],\"banned_function_names\":[\"分享朋友圈\",\"客服消息接口\"]}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 2 }
event_type=3
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4qHkaYV-0NYupPZBTBrBNuw", "CreateTime": 1699801563, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "13577869", "appid": "wx54a8eaa26606test", "punish_time": 1699801560, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "违规内容测试" ], "detail": "{\"suspended_days\":1}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 3 }
event_type=4
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4jjAdCWq1klrk-puPMe0FC4", "CreateTime": 1699784111, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "9328325", "appid": "wx54a8eaa26606test", "punish_time": 1699784109, "illegal_reason": "存在诱导分享行为", "illegal_content": [ "测试违规内容/证据" ], "detail": "{\"banned_days\":3}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_5-1-滥用分享行为", "rule_name": "《微信小程序平台运营规范》5.行为规范-5.1滥用分享行为", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 4 }
event_type=10
{ "ToUserName": "gh_1d6c1222test", "FromUserName": "oyeHc4n0I6U3A4Fq7tfOAqmAJy8E", "CreateTime": 1699802583, "MsgType": "event", "Event": "wxa_punish_event", "punish_id": "94185814", "appid": "wx54a8eaa266009d6a", "punish_time": 1699802425, "illegal_reason": "发布低俗、性暗示或色情信息", "illegal_content": [ "测试证据" ], "detail": "{\"path\":\"pages/fengjin/fengjin\"}", "rule_url": "https://developers.weixin.qq.com/miniprogram/product/index.html#_6-2-色情低俗内容", "rule_name": "《微信小程序平台运营规范》6.信息内容规范-6.2色情低俗内容", "adjust_guide_url": "https://mp.weixin.qq.com/s/73rLZmwPeQ87Q89DYQcfkw", "event_type": 10 }