wx-tools 客服相关API
2023-03-22 17:20 更新
包括如下接口:
- addKfAccount - 添加客服
- updateKfAccount - 更新客服
- deleteKfAccount - 删除客服
- getAllKfAccount - 获取所有客服信息
- sendMessageByKf - 客服发送消息
- updateKfHeadImage - 更新客服头像
3.7.1 addKfAccount 添加客服
WxError result = iService.addKfAccount(new KfAccount("ant@test", "ant", "ant"));
System.out.println(result);
3.7.2 updateKfAccount 更新客服
WxError result = iService.updateKfAccount(new KfAccount("ant@test", "ant", "ant"));
System.out.println(result);
3.7.3 deleteKfAccount 删除客服
WxError result = iService.deleteKfAccount(new KfAccount("ant@test", "ant", "ant"));
System.out.println(result);
3.7.4 getAllKfAccount 获取所有客服信息
KfAccountListResult result = iService.getAllKfAccount();
System.out.println(result);
3.7.5 sendMessageByKf 客服发送消息
KfSender sender = new KfSender();
sender.setTouser("oROCnuNihJnO9bnKOAORDFFriPgQ");
sender.setMsgtype(WxConsts.MASS_MSG_TEXT);
sender.setText(new Text("hi"));
System.out.println(iService.sendMessageByKf(sender))
3.7.6 updateKfHeadImage 更新客服头像
iService.updateKfHeadImage("oROCnuNihJnO9bnKOAORDFFriPgQ", new File("D:/wx/wx.jpg"));
以上内容是否对您有帮助:
更多建议: