Query Information of a Live Chat Channel
Query the detailed information of a specific Live Chat channel.
Request URL
GET {base_url}/{api_path}/message_channel/getlivechat?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of a Live Chat channel. Note: You can query channel ID using Search Specific Message Channels.
|
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
| data | Object<LiveChat_Channel> | The detailed information of the Live Chat channel. |
- LiveChat_Channel
-
Table 3. Parameter Type Description id Integer The unique ID of the message channel. name String Name of the message channel. type String Type of the message channel. livechat
channel String The service provider of the message channel. livechat
channel_number String Number of the message channel. website_domain String The domain name of the website where the Live Chat channel will be embedded. communication_method Integer The interaction mode supported on the Live Chat channel. 1: Chat only.2: Phone call and chat.
destination_type String The type of the destination. extension: Extension user.queue: Message queue.api: Third-party message analytics platform (Transmitted via API).
destination_id String The ID of destination to which inbound messages are sent. enable_webrtc_inbound_call Integer Whether WebRTC inbound call is enabled. 0: Disabled.1: Enabled.
webrtc_trunk_id Integer The unique ID of the WebRTC trunk. webrtc_inbound_route_id Integer The unique ID of the WebRTC trunk inbound route. max_concurrent_call Integer The maximum number of concurrent calls supported on the Live Chat channel. message_type Integer The message type that website visitors can send. 1: Text and emojis.2: Text, emojis, and images.
auto_close_session Integer Whether messaging sessions will be automatically closed after being inactive for a specified period of time. 0: Disabled.1: Enabled.
session_expired_time Integer The duration of inactivity after which a message session is automatically closed. session_expired_unit String The time unit for session expiration. minitehourday
theme_mode String Theme mode of the Live Chat widget. lightdark
theme_color String Theme color of the Live Chat widget. minimize_style String The style of the minimized window. round: Bubble style.bar: Strip style.
chat_icon String Chat icon of the Live Chat widget. 1:
2:
3:
4:
5:
6:
default_avatar String The file name (ID) of the agent avatar. Note: This parameter only returns the file name when a custom agent avatar is used in the channel.default_agent_name String Default agent name. show_agent_info Integer Whether agent information is displayed. 0: Not displayed.1: Agent name is displayed.2: Agent name and avatar are displayed.
hide_provider_info Integer Whether the service provider's information Powered by Yeastaris displayed in the Live Chat widget.0: Displayed.1: Not displayed.
language String The display language of the Live Chat widget. BROWSER_LANGUAGE: Follow website visitor's 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 Whether pre-chat form is enabled. 0: Disabled.1: Enabled.
prechat_form_title String The title of the pre-chat form. prechat_form_subtitle String The sub-title of the pre-chat form. show_name Integer Whether name field is displayed in the pre-chat form. 0: Not displayed.1: Displayed.
show_email Integer Whether email address field is displayed in the pre-chat form. 0: Not displayed.1: Displayed.
show_phone Integer Whether phone number field is displayed in the pre-chat form. 0: Not displayed.1: Displayed.
require_name Integer Whether name is required in the pre-chat form. 0: Optional.1: Required.
require_email Integer Whether email address is required in the pre-chat form. 0: Optional.1: Required.
require_phone Integer Whether phone number is required in the pre-chat form. 0: Optional.1: Required.
enable_data_privacy Integer Whether Data Privacy Policy is enabled or not. 0: Disabled.1: Enabled. The Data Privacy Policy will be displayed in the Live Chat widget.
data_privacy_content String The content of the Data Privacy Policy. require_data_privacy_consent Integer Whether consent for Data Privacy Policy is required. 0: Not required.1: Required.
online_welcome_message String The welcome message automatically sent to website visitors when they enter the chat widget while the system is within business hours and the message destination is available. offline_welcome_message String The welcome message automatically sent to website visitors when they enter the chat widget while the system is outside business hours, or the message destination is not available. first_reply_message String The message automatically sent after the website visitor sends their first message, regardless of message type. session_closed_message String The message automatically sent to website visitors when the chat session ends, either manually closed by agent / website visitor or automatically closed when session timeout is reached.
Examples
Request example
Query the information of a Live Chat channel (ID: 219).
GET /openapi/v1.0/message_channel/getlivechat?access_token=6kH03St87BsUCgDVcRKSVenrBYZ1d37q&id=219 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
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"
}
}