Search Specific Message Channels
Search specific message channels.
Request URL
GET {base_url}/{api_path}/message_channel/search?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| page | Yes | Integer | Define which page is displayed. |
| page_size | Yes | Integer | Define how many records per page. |
| time_range | Yes | String | Specify the time period for counting or filtering messages of the message channels. Valid value:
|
| search_value | No | String | Search keyword. |
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
|
| errmsg | String | Returned message.
|
| total_number | Integer | The total number of the searched message channels. |
| list | Array<Msg_Channel> | The information of the message channels. |
Msg_Channel
| Parameter | Type | Description |
|---|---|---|
| id | Integer | The unique ID of the message channel. |
| status | String | The connection status of the message channel.
|
| reason | String | The reason why the message channel connection fails. |
| name | String | Name of the message channel. |
| channel | String | The service provider of the message channel.
|
| type | String | Type of the message channel.
|
| number | Array<String> | DID number(s) associated with the message channel. |
| sent | Integer | The number of sent messages. |
| delivered | Integer | The number of messages sent successfully. |
| failed | Integer | The number of messages that failed to send. |
| received | Integer | The number of received messages. |
Examples
Request example
GET /openapi/v1.0/message_channel/search?access_token=znoITCklDMRbzBxLGUwIUJOmmVaRx6zy&page=1&page_size=2&time_range=last_7_days&search_value=Sales HTTP/1.1 Host: 192.168.5.150:8088
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 6,
"list": [
{
"id": 3,
"status": "status_connect_succ",
"reason": "",
"name": "Sales Hotline",
"channel": "whatsapp",
"type": "whatsapp",
"number": [
"+12025550123"
],
"sent": 0,
"delivered": 0,
"failed": 0,
"received": 0
}
]
}