💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# 在小程序中使用微信客服 <br> [<h2>微信客服官方API文档入口</h2>](https://open.work.weixin.qq.com/kf/doc/92512/93143/93304) <br> <br> 1、获取微信客服地址。登录芝麻客服后台,选择对应的微信客服企业,选择渠道设置。点击渠道链接的复制即可。 ![](https://img.kancloud.cn/98/81/9881d5cb9ed73f71f5ac48e4e602e6df_1747x615.png) 2、在小程序中调用官方API([API地址](https://developers.weixin.qq.com/miniprogram/dev/api/open-api/service-chat/wx.openCustomerServiceChat.html)),打开微信客服。示例如下: ~~~ wx.openCustomerServiceChat({ extInfo: {url: 'https://work.weixin.qq.com/kfid/kfc3e76250fea3df696?encScene=ENC9GcAL6Rv9o1ttdmK99HPNQP3RJMufX6aXFukCnceDVX1'}, corpId: 'ww6a828cef76872a2d', success(res) {} } ) ~~~ 其中,url为1中获取的渠道链接,corpID为微信客服后台获取的企业id: ![](https://img.kancloud.cn/fe/da/feda367c80dfda0a478bd48125109711_1398x636.png) 3、用户点击按钮,即可跳转到微信客服界面咨询客服了。 ![](https://img.kancloud.cn/e8/9b/e89b88893bc4c442591feb2e318a08f9_328x376.gif) <br> <br> ## 微信客服第三方服务商 - 芝麻客服接入指南 <br> 1. 登陆 [芝麻客服官网](https://xiaokefu.com.cn/index/wechatkefu),点击 [一键接入微信客服组件](https://xiaokefu.com.cn/app/selectionWechatKf)。 </h> ![](https://img.kancloud.cn/af/df/afdfff884685c34bd8b8cdadbc7bb168_500x270.jpg) </h> </h> 2. 点击 下一步 ,然后企业微信管理员扫码即可。 </h> ![](https://img.kancloud.cn/4a/90/4a909d691b66bc168fba2cfed4f7f7cd_500x305.jpg) </h> </h>