List group channels
This action retrieves a list of group channels. You can use various query parameters to determine the search scope and select what kind of information you want to receive about the queried channels.
If you want to retrieve a list of group channels that a specific user has joined, use the list group channels by user action under the User section.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Optional
Parameter name | Type | Description |
---|---|---|
token | string | Specifies a page token that indicates the starting index of a chunk of results. If not specified, the index is set as 0. |
limit | integer | Specifies the number of results to return per page. Acceptable values are |
distinct_mode | string | Restricts the search scope to only retrieve distinct or nondistinct group channels. Acceptable values are the following: |
public_mode | string | Restricts the search scope to only retrieve either public or private group channels. Acceptable values are the following: |
super_mode | string | Specifies which type of group channels to retrieve. Acceptable values are the following: |
created_after | long | Restricts the search scope to only retrieve group channels which have been created after the specified time, in Unix milliseconds format. |
created_before | long | Restricts the search scope to only retrieve group channels which have been created before the specified time, in Unix milliseconds format. |
show_empty | boolean | Determines whether to include empty channels in the response. Empty channels are channels that have been created but that don't have any messages. If set to |
show_member | boolean | Determines whether to include information about the members of each channel in the response. (Default: |
show_delivery_receipt | boolean | Determines whether to include information about the delivery receipts of each channel in the response. The delivery receipt indicates the timestamp of when each member has last received messages from the Sendbird server in the channel, in Unix milliseconds. (Default: |
show_read_receipt | boolean | Determines whether to include information about the read receipts of each channel in the response. The read receipt indicates the timestamp of when each member has last read the messages in the channel, in Unix milliseconds. (Default: |
show_metadata | boolean | Determines whether to include channel metadata in the response. (Default: |
show_frozen | boolean | Determines whether to include frozen channels in the response. Frozen channels are channels where only operators are allowed to send messages. (Default: |
order | string | Specifies the method to sort a list of results. Acceptable values are the following: |
metadata_order_key | string | Specifies the key of an item in metadata. When a value of the |
custom_types | string | Specifies a comma-separated string of one or more custom types to filter group channels. URL encoding each type is recommended. If not specified, all channels are returned, regardless of their custom type. |
custom_type_startswith | string | Searches for group channels with the custom type which starts with the specified value. URL encoding the value is recommended. |
channel_urls | string | Specifies a comma-separated string of one or more group channel URLs to restrict the search scope. URL encoding each channel URL is recommended. |
name | string | Specifies one or more group channel names. |
name_contains | string | Searches for group channels whose names contain the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended. |
name_startswith | string | Searches for group channels whose names start with the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended. |
members_exactly_in | string | Searches for group channels with all the specified users as members. The parameter value should consist of user IDs separated by commas. |
members_include_in | string | Searches for group channels that include one or more users as members among the specified users. The value should consist of user IDs separated by commas or |
query_type | string | Specifies a logical condition applied to the |
members_nickname | string | Searches for group channels with members whose nicknames match the specified value. URL encoding the value is recommended. |
members_nickname_contains | string | Searches for group channels with members whose nicknames contain the specified value. Note that this parameter is case-insensitive. URL encoding the value is recommended. |
metadata_key | string | Searches for group channels with metadata containing an item with the specified value as its key. To use this parameter, either the |
metadata_values | string | Searches for group channels with metadata containing an item with the key specified by the |
metadata_value_startswith | string | Searches for group channels with metadata containing an item with the key specified by the |
metacounter_key | string | Searches for group channels with metacounter containing an item with the specified value as its key. To use this parameter, either the |
metacounter_values | string | Searches for group channels with metacounter containing an item with the key specified by the |
metacounter_value_gt | string | Searches for group channels with metacounter containing an item with the key specified by the |
metacounter_value_gte | string | Searches for group channels with metacounter containing an item with the key specified by the |
metacounter_value_lt | string | Searches for group channels with metacounter containing an item with the key specified by the |
metacounter_value_lte | string | Searches for group channels with metacounter containing an item with the key specified by the |
include_sorted_metaarray_in_last_message | boolean | Determines whether to include the |
| string | (Deprecated) Returns channels whose |
| boolean | (Deprecated) Superseded by |
| boolean | (Deprecated) Superseded by |
| boolean | (Deprecated) Superseded by |
| string | (Deprecated) Superseded by |
| string | (Deprecated) Restricts the search scope to only retrieve the target user's group channels. It's recommended to use the list group channels by user action instead. |
Responses
If successful, in the response body, this action returns a list of group channel resources.
List of response properties
Property name | Type | Description |
---|---|---|
channels[] | array of objects | An array of group channel objects that match the specified optional parameters. |
next | string | The value for the |
Error
In the case of an error, an error object like below is returned. See the error codes section for more details.
Supergroup channels
To only retrieve Supergroup channels, you can use the same the list group channels action but set the super_mode
parameter to super
.
You can also see whether a returned channel object is a Supergroup channel by checking that the is_super
response property has a value of true
.
HTTP request
Parameters
The following table lists the parameters that this action supports.
Required
Parameter name | Type | Description |
---|---|---|
super_mode | string | Specifies which type of group channels to retrieve. Acceptable values are the following: |
Responses
If successful, this action returns a group channel resource of Supergroup channel in the response body.
Error
In the case of an error, an error object like below is returned. See the error codes section for more details.