简要描述:

  • 客服获取websocket配置

请求URL:

GET/plugin.yun-chat.frontend.chat.get-ws-setting

参数:

参数名 是否必须 类型 说明
channel_type int pc端调用接口传55

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "成功",
	"data": {
		"wss_params": {
			"appId": "660001",
			"signature": "5C69287E83ECE8583A76B9E1780B5133",
			"nonceStr": "t2l0s9ks3vo2fygy",
			"timestamp": 1614737710292,
			"host": "wss:\/\/openapi.yunqiankeji.com\/ws",
			"clientid": "pc_660001_2_employee_1"
		},
		"chat_opt_setting":{
			"pic":1,
			"goods":1,
			"order":1,
			"transfer":1,
			"reply":1,
		},
		"show_order_search":true,
		"notice_audio_data":"",
		"no_permission":0,
		"condition_msg":"",
		"condition_jump":"",
		"condition_jump_min":"",
	}
}

错误时返回:


返回参数说明:

参数名 类型 说明
wss_params obj websocket配置信息
wss_params->appId string appId
wss_params->signature string signature
wss_params->nonceStr string nonceStr
wss_params->timestamp string timestamp
wss_params->host string websocket连接地址
wss_params->clientid string clientid
chat_opt_setting obj 发送消息类型图标显示,0-不显示,1-显示
chat_opt_setting->pic int 图片
chat_opt_setting->goods int 商品
chat_opt_setting->order int 订单
chat_opt_setting->transfer int 转接客服
chat_opt_setting->reply int 快捷回复
show_order_search bool 会话页面是否显示订单列表
notice_audio_data string 新消息提示音地址
- - -
no_permission string 1无权限,0正常
condition_msg string no_permission=1时返回,提示信息
condition_jump string no_permission=1时返回,跳转链接
condition_jump_min string no_permission=1时返回,小程序跳转链接

appId,signature,nonceStr,timestamp,clientid按照现在前端的规则来拼接,不清楚的问后端