{"filter": {"is_to_all": false, "tag_id": 100}, "mpnews": {"media_id": "17o6Lrnxs3zMcoMieQUOYsqGqB3AgSNNsIPsa-IWKfs"}, "msgtype": "mpnews", "send_ignore_reprint": 1}
https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token=xxxxxxxxxxxx
{'errcode': 40008, 'errmsg': 'invalid message type rid: 60c079d9-63a38359-2a87bb12'}
一直提示40008错误信息
你传进来的不是json,而是:
filter=is_to_all&filter=tag_id&mpnews=media_id&msgtype=mpnews&send_ignore_reprint=1
pay_send_all={
"filter":{
"is_to_all":False,
"tag_id":100
},
"mpnews":{
"media_id":media_id
},
"msgtype":"mpnews",
"send_ignore_reprint":1
}
url='https://api.weixin.qq.com/cgi-bin/message/mass/sendall?access_token='+get_token()
headers = {'Content-Type': 'application/json'}
r=requests.post(url=url,data=pay_send_all, headers=headers)