微信公众平台调用客服消息接口主动向用户发送消息

接口文档:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421140547

调试地址:https://mp.weixin.qq.com/debug/cgi-bin/apiinfo

  • 接口类型:向用户发送消息
  • 接口列表:发送客服消息接口 /message/custom/send
  • 参数body
1
2
3
4
5
6
7
{
"touser": "orw1Z0WYZhKEudEeNlnbZA1Gg1pk",
"msgtype": "image",
"image": {
"media_id": "UqVf_mJoqsJxs_gQxqas-8yKfZSHuBK0UO0_DtITJiig9CVRd8oVtHDaRyql69BO"
}
}

若返回错误信息:errcode=45015, errmsg=response out of time limit or subscription is canceled

1
2
3
4
{
"errcode": 45015,
"errmsg": "response out of time limit or subscription is canceled hint: [IVHYVA0391ge31]"
}

则表明用户已经超过24小时没有和公众号发生交互了,此时只需用户发送消息到公众号,再调用接口就可以了。

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :