Query Information of a Message Channel
Query the detailed information of a specific message channel.
Note: This API endpoint can be used to query the information of SMS
channel, WhatsApp channel, and Facebook channel. To query the information of a Live Chat
channel, see Query Information of a Live Chat Channel.
Request URL
GET {base_url}/{api_path}/message_channel/get?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of the message channel. Note: You can query message 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<Msg_Channel> | The detailed information of the message channel. |
- Msg_Channel
-
Table 3. Parameter Type Description id Integer The unique ID of the message channel. name String Name of the message channel. domain_type String The type of domain used in the Webhook URL. fqdnnat
webhook_gid String Global identifier of the Webhook. webhook_url String The Webhook URL used for messaging webhook. type String Type of the message channel. smswhatsappfacebook
channel String The service provider of the message channel. generalapidazeathenabandwidthflowrouteixicasiptrunkskyeteltelnyxtwiliovettavoicemeupwhatsappfacebook
account_data Array<Auth_Info> The data required by the service provider for message channel connection. verify_token String The token used for webhook verification. phone_number_id String Phone number ID. Note: This parameter only returns value when querying a WhatsApp channel.business_account_id String WhatsApp Business Account ID. Note: This parameter only returns value when querying a WhatsApp channel.send_rate Integer Message sending rate, which indicates the number of messages that PBX can send per second via the message channel. 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 (in days) after which a session is automatically closed. dids Array<Msg_Routing> The details of message routing rule for the message channel. accompanying_msg String Accompanying text content for chat file. Note: This parameter only returns value when querying an Apidaze SMS channel.
Examples
Request example
Query the information of a message channel (ID: 3).
GET /openapi/v1.0/message_channel/get?access_token=IhFe7Gv1L3chn45Bwmxz3GKKKmjXAaDs&id=3 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "data": { "id": 3, "name": "WhatsApp Channel", "webhook_gid": "90c8a2b5b3434471bd73e7c802952f96", "type": "whatsapp", "channel": "whatsapp", "account_data": [ { "k": "access_token", "v": "EAAXmEG1QQccBO9wpYSY3r1ZApPu4mmEUvOszfHil3mYLn8xnIlOtirhNoZAybL3TKFHxhgFzdOO9ZBk2XVRPnAHNZCCRmrKZClsM4VCqBPqJWRIt3yaZAjYJZC79UO2pTYaJbtSlIhvHEmSdXXgzmGpsfMFCHEh4N3bY7rsarAf214VP2JFbwNihmXQZAmeSFwZDZD" }, { "k": "app_secret", "v": "41665cf6ef8971b3e1778432ffc2f077" } ], "auto_close_session": 1, "session_expired_time": 1, "dids": [ { "did_number": "+15550193510", "destination_id": "5", "destination_number": "", "members": [ { "text": "Default_All_Extensions", "text2": "Default_All_Extensions", "value": "1", "type": "ext_group" } ], "destination_type": "api" } ], "webhook_url": "https://docs.example.yeastar.com/api/v1.0/webhook/whatsapp/90c8a2b5b3434471bd73e7c802952f96", "send_rate": 80, "phone_number_id": "11577555571069", "verify_token": "braxzqj5z8md6e29", "domain_type": "fqdn", "accompanying_msg": "", "business_account_id": "10615155550235" } }