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

Table 1.
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

Table 2.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.
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.
  • fqdn
  • nat
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.
  • sms
  • whatsapp
  • facebook
channel String The service provider of the message channel.
  • general
  • apidaze
  • athena
  • bandwidth
  • flowroute
  • ixica
  • siptrunk
  • skyetel
  • telnyx
  • twilio
  • vetta
  • voicemeup
  • whatsapp
  • facebook
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.
Auth_Info
Parameter Type Description
k String The name of the key field required by the service provider.
v String The value corresponding to the key field.
Msg_Routing
Parameter Type Description
id Integer The unique ID of the DID number.
omnichannel_id Integer The unique ID of the message channel that is associated with the DID number.
did_number String The DID number associated with the message channel.
destination_id String The ID of destination to which inbound messages are sent.
destination_number String The number of the destination.
destination_name String The name of the destination.
members Array<Members> The members that are allowed to initiate a message session using the DID number.
destination_type String The type of the destination.
  • extension: Extension user.
  • queue: Message queue.
  • api: Third-party message analytics platform (Transmitted via API).
Members
Parameter Type Description
text String The name of the member.
text2 String The information of the member, depending on the member type.
  • For extension: Extension number is returned.
  • For extension group: Extension group name is returned.
  • For organization: An empty string is returned.
value String The unique ID of the member.
type String Member type.
  • extension
  • ext_group
  • organization

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"
    }
}