php - 微信客服消息发送接口指定客服发送消息问题

 苦--但是依然love着你 发布于 2022-12-01 08:48

客服接口-发消息

接口调用请求说明

http请求方式: POST
https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=ACCESS_TOKEN

请注意,如果需要以某个客服帐号来发消息(在微信6.0.2及以上版本中显示自定义头像),则需在JSON数据包的后半部分加入customservice参数,例如发送文本消息则改为:
{

"touser":"OPENID",
"msgtype":"text",
"text":
{
     "content":"Hello World"
},
"customservice":
{
     "kf_account": "test1@kftest"
}

}

多客服已经添加,添加customservice无效,没有使用指定客服。有谁用过吗,求指教?

找到解决办法了:
customservice放在回复内容前面
{

"touser":"OPENID",
"msgtype":"text",
"customservice":
{
     "kf_account": "test1@kftest"
},
"text":
{
     "content":"Hello World"
}

}
我也是醉了

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有