1、推送文本消息JSON
{"touser": "oa-GIuOu4MQ4eVc0P-wrvy6aFECs",
"msgtype": "text",
"text": {
"content": "Hello ,I am David Lee!"
}
}
2、推送图片消息JSON
{
"touser": "oa-GIuOu4MQ4eVc0P-wrvy6aFECs",
"msgtype": "image",
"image": {
"media_id": "MiF6d0A1QK7geu21hfABdW4fgiSEiP0CNkDgOgZknZgOmqiZKImlpGK0Ypm7mvbJ"
}
}
MEDIA_ID为上传去服务的图片的ID值。
3、推送视频消息JSON
上传视频文件获得MEDIA_ID:
{
"touser": "oa-GIuOu4MQ4eVc0P-wrvy6aFECs",
"msgtype": "video",
"video":
{
"media_id":
"Iayq1HPFCRXwFN26iTcMHp9deGMKsuhtpD2A0QdXHwUpbxO91utnnY350XAa2K39" }
}
MEDIA_ID为上传去服务的视频的ID值。
测试公众号: