wx-tools 客服相关API

2023-03-22 17:20 更新

包括如下接口:
- addKfAccount - 添加客服
- updateKfAccount - 更新客服
- deleteKfAccount - 删除客服
- getAllKfAccount - 获取所有客服信息
- sendMessageByKf - 客服发送消息
- updateKfHeadImage - 更新客服头像


3.7.1 addKfAccount 添加客服

  1. WxError result = iService.addKfAccount(new KfAccount("ant@test", "ant", "ant"));
  2. System.out.println(result);

3.7.2 updateKfAccount 更新客服

  1. WxError result = iService.updateKfAccount(new KfAccount("ant@test", "ant", "ant"));
  2. System.out.println(result);

3.7.3 deleteKfAccount 删除客服

  1. WxError result = iService.deleteKfAccount(new KfAccount("ant@test", "ant", "ant"));
  2. System.out.println(result);

3.7.4 getAllKfAccount 获取所有客服信息

  1. KfAccountListResult result = iService.getAllKfAccount();
  2. System.out.println(result);

3.7.5 sendMessageByKf 客服发送消息

  1. KfSender sender = new KfSender();
  2. sender.setTouser("oROCnuNihJnO9bnKOAORDFFriPgQ");
  3. sender.setMsgtype(WxConsts.MASS_MSG_TEXT);
  4. sender.setText(new Text("hi"));
  5. System.out.println(iService.sendMessageByKf(sender))

3.7.6 updateKfHeadImage 更新客服头像

  1. iService.updateKfHeadImage("oROCnuNihJnO9bnKOAORDFFriPgQ", new File("D:/wx/wx.jpg"));
以上内容是否对您有帮助:
在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号