查询单条在线咨询渠道信息
查询指定在线咨询 (Live Chat) 渠道的详细信息。
请求 URL
GET {base_url}/{api_path}/message_channel/getlivechat?access_token={access_token}
请求参数
| 参数 | 是否必填 | 类型 | 说明 |
|---|---|---|---|
| id | 是 | Integer | 在线咨询渠道的唯一 ID。 注: 可使用 查询特定消息渠道 查询渠道
ID。
|
响应参数
| 参数 | 类型 | 说明 |
|---|---|---|
| errcode | Integer | 返回错误码。
注: 更多错误码和错误信息说明,请参见 错误码 & 错误信息。
|
| errmsg | String | 返回信息。
|
| data | Object<LiveChat_Channel> | 在线咨询渠道详情。 |
- LiveChat_Channel
-
表 3. 参数 类型 说明 id Integer 消息渠道的唯一 ID。 name String 消息渠道名称。 type String 消息渠道类型。 livechat
channel String 消息渠道的运营商。 livechat
channel_number String 消息渠道的号码。 website_domain String 要嵌入在线咨询渠道的网站的域名。 communication_method Integer 在线咨询渠道支持的咨询方式。 1:仅聊天。2:聊天和通话。
destination_type String 消息接收目的地的类型。 extension:分机用户。queue:消息队列。api:第三方分析平台 (消息通过二次开发接口传递)
destination_id String 消息接收目的地的 ID。 enable_webrtc_inbound_call Integer 是否启用了 WebRTC 呼入功能。 0:禁用。1:启用。
webrtc_trunk_id Integer WebRTC 中继的唯一 ID。 webrtc_inbound_route_id Integer WebRTC 中继呼入路由的唯一 ID。 max_concurrent_call Integer 在线咨询渠道支持的最大通话并发数。 message_type Integer 访客可发送的消息类型。 1:文本和表情。2:文本、表情和图片。
auto_close_session Integer 是否自动关闭在指定时间内无任何互动的消息会话。 0:禁用。1:启用。
session_expired_time Integer 会话超时时间。消息会话在超过此指定时间未有任何互动后将自动关闭。 session_expired_unit String 会话超时时间的单位。 minite:分钟。hour:小时。day:天。
theme_mode String 在线咨询插件的主题模式。 light:浅色模式。dark:深色模式。
theme_color String 在线咨询插件的主题颜色。 minimize_style String 最小化窗口类型。 round:气泡。bar:条形。
chat_icon String 在线咨询插件的聊天图标。 1:
2:
3:
4:
5:
6:
default_avatar String 客服头像的文件名 (ID)。 注: 此参数仅在渠道中使用了自定义客服头像时会返回对应头像文件名。default_agent_name String 默认客服名称。 show_agent_info Integer 是否展示客服信息。 0:不展示。1:展示客服名称。2:展示客服名称和头像。
hide_provider_info Integer 是否在插件中展示服务提供商信息 由星纵数字提供软件支持。0:展示。1:不展示。
language String 在线咨询插件的显示语言。 BROWSER_LANGUAGE:跟随访客的浏览器语言。en:Englishzh-CN:简体中文 (Chinese Simplified)zh-TW:繁體中文 (Chinese Traditional)ar:العربية (Arabic)pt_BR:Português Brasil (Portuguese Brazil)cz:Čeština (Czech)nl:Nederlands (Dutch)fr:Française (French)de:Deutsch (German)he:עברית (Hebrew)it:Italiano (Italian)ja:日本語 (Japanese)fa:فارسی (Persian)pl:Polski (Polish)pt:Português (Portuguese)ru:Pусский (Russian)sl:Slovenščina (Slovenian)es:Español (Spanish)th:ไทย (Thai)tr:Türk (Turkish)tk:Türkmenistan (Turkmen)uk:Українська (Ukrainian)vi:Tiếng Việt (Vietnamese)
enable_prechat_form Integer 是否启用了预聊天表单。 0:禁用。1:启用。
prechat_form_title String 预聊天表单的标题。 prechat_form_subtitle String 预聊天表单的子标题。 show_name Integer 是否在预聊天表单中显示姓名字段。 0:不显示。1:显示。
show_email Integer 是否在预聊天表单中显示邮箱地址字段。 0:不显示。1:显示。
show_phone Integer 是否在预聊天表单中显示电话号码字段。 0:不显示。1:显示。
require_name Integer 预聊天表单中的姓名字段是否必填。 0:选填。1:必填。
require_email Integer 预聊天表单中的邮箱地址字段是否必填。 0:选填。1:必填。
require_phone Integer 预聊天表单中的电话号码字段是否必填。 0:选填。1:必填。
enable_data_privacy Integer 是否启用了数据隐私与同意。 0:禁用。1:启用。在线咨询插件将显示数据隐私与同意内容。
data_privacy_content String 数据隐私与同意的文本内容。 require_data_privacy_consent Integer 是否要求用户明确同意数据隐私与同意的声明。 0:不需要。1:需要。
online_welcome_message String 在系统处于工作时间且消息目的地可达时,访客进入聊天窗口后自动发送的欢迎消息。 offline_welcome_message String 在系统处于非工作时间或消息目的地不可用时,访客进入聊天窗口后自动发送的欢迎消息。 first_reply_message String 访客发送第一条消息后自动发送的回复消息。 session_closed_message String 当消息会话结束时 (无论是由坐席或访客手动关闭会话,或因超时自动关闭会话) 自动发送的文本消息。
示例
请求示例
查询在线咨询渠道 (ID:219) 的信息。
GET /openapi/v1.0/message_channel/getlivechat?access_token=6kH03St87BsUCgDVcRKSVenrBYZ1d37q&id=219 HTTP/1.1
Host: 192.168.5.150:8088
响应示例
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"data": {
"id": 219,
"name": "Docs-LiveChat Channel",
"type": "livechat",
"channel": "livechat",
"channel_number": "LC00113",
"destination_type": "extension",
"destination_id": 137,
"website_domain": "www.yeastar.com",
"communication_method": 2,
"enable_webrtc_inbound_call": 1,
"webrtc_trunk_id": 3,
"webrtc_inbound_route_id": 3,
"max_concurrent_call": 5,
"message_type": 2,
"theme_mode": "light",
"theme_color": "#00DDB3",
"minimize_style": "bar",
"chat_icon": "6",
"default_avatar": "",
"default_agent_name": "Support",
"show_agent_info": 0,
"hide_provider_info": 0,
"language": "BROWSER_LANGUAGE",
"enable_prechat_form": 1,
"prechat_form_title": "Hello 👋",
"prechat_form_subtitle": "Please fill in the form below before starting the chat.",
"require_name": 1,
"require_phone": 0,
"require_email": 0,
"enable_data_privacy": 1,
"data_privacy_content": "<p>We need to store and process your personal data to provide you with the requested content. For detailed information about our privacy practices and our commitment to protecting your privacy, please check our Privacy Policy.</p>",
"require_data_privacy_consent": 1,
"online_welcome_message": "Hello! How can we help you?",
"offline_welcome_message": "We are away, leave us a message!",
"first_reply_message": "Hello, thank you for contacting us. We have received your message.",
"session_closed_message": "This chat session has ended. Please feel free to contact us if you have any further questions.",
"auto_close_session": 1,
"session_expired_time": 1,
"show_name": 1,
"show_phone": 1,
"show_email": 1,
"session_expired_unit": "day"
}
}