群发消息,步骤如下:
1.上传视频类型临时素材
接口: https://api.weixin.qq.com/cgi-bin/media/upload
返回media_id:v3aIAsy8tTGas8jx29vIAhKPVwUIwcpCM8h7HOGWkAOCNfApNqPMvFu5Iy3Rv8KE
2.转换视频media_id
对应微信开发文档:
接口:https://api.weixin.qq.com/cgi-bin/media/uploadvideo
参数:
{
"description": "123",
"media_id": "v3aIAsy8tTGas8jx29vIAhKPVwUIwcpCM8h7HOGWkAOCNfApNqPMvFu5Iy3Rv8KE",
"title": "1.mp4"
}
返回:
{
"type": "video",
"media_id": "USHTCCV0akPORt7JpreRuqlCnH3mZzmZaN9VT3DSFHBilLLpw-leBWXaw3wIPmAP",
"created_at": 1675950244,
"item": []
}
3.发送视频消息
接口: https://api.weixin.qq.com/cgi-bin/message/mass/sendall
参数:
{
"filter":{
"is_to_all":false,
"tag_id":102
},
"mpvideo":{
"media_id":"USHTCCV0akPORt7JpreRuqU2loL-jKzWuhKGkAhS31ll8RDZNZjaaMBp9DEfO2js"
},
"msgtype":"mpvideo"
}
4.用户接收效果
进入后视频一直加载:
5.相关数据
通过临时素材查询接口返回的视频地址可以打开:
https://api.weixin.qq.com/cgi-bin/media/get
http://203.205.136.236/vweixinp.tc.qq.com/1007_4022694051484d35933038146d77cd82.f10.mp4?vkey=B1F8E060DF207A156D5E8C560DD7580D3931AC8FD25F589EAB7C140D081AD5A1C62B314B7F920B5817015A6B27D2476A9C9ABE6BF9F37EE00AE77A7079B9AF1A2FADF26D44336C091AEA6405DDA4238A7EF274F6B337D281&sha=0&save=1
用户收到消息里的视频url:
所有想请问为什么用户收到的视频无法播放
你好,你方便提供这篇文章链接给我们查看吗