简要描述:

  • 用户获取websocket配置

请求URL:

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

参数:

参数名 是否必须 类型 说明

返回示例:

正确时返回:

{
	"result": 1,
	"msg": "成功",
	"data": {
		"wss_params": {
			"appId": "660001",
			"signature": "5C69287E83ECE8583A76B9E1780B5133",
			"nonceStr": "t2l0s9ks3vo2fygy",
			"timestamp": 1614737710292,
			"host": "wss:\/\/openapi.yunqiankeji.com\/ws",
			"clientid": "h5_660001_2_customer_1307"
		},
		"chat_opt_setting":{
			"pic":1,
			"goods":1,
			"order":1,
			"transfer":1,
			"reply":1,
		}
	}
}

错误时返回:


返回参数说明:

参数名 类型 说明
wss_params obj websocket配置信息
appId string appId
signature string signature
nonceStr string nonceStr
timestamp string timestamp
host string websocket连接地址
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_tool_bar int 是否显示聊天工具栏,0-不显示,1-显示
chat_tool_bars arr 聊天工具栏
chat_tool_bars->id int id
chat_tool_bars->name int 名称
chat_tool_bars->type int 类型:0-关键词回复,1-链接跳转
chat_tool_bars->key_word string 关键词
chat_tool_bars->h5_url string 页面链接
chat_tool_bars->mini_app_link string 小程序页面链接

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