getChannels
function provides comprehensive search capabilities that allow you to find channels based on multiple criteria. With support for filtering by display name, tags, membership status, and channel types, you can quickly locate exactly the channels you need.
Query Capabilities
The query function returns a Live Collection of channels that match your search criteria, enabling you to display search results in your app or apply additional filtering as needed.Advanced Filtering
Multiple search criteria
- Display name and tag-based searching
- Membership status filtering
- Channel type specification
- Include/exclude deleted channels
Live Collection Results
Real-time search results
- Automatic updates when channels change
- Pagination support for large result sets
- Efficient data loading and caching
Channel Query Parameters
Core search functionalitySearch for channels using basic criteria such as display name and membership status.
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
displayName | String | ❌ | Search query for channel’s public display name |
includeDeleted | Boolean | ❌ | Include closed/deleted channels (null = both, false = active only) |
filter | String | ❌ | Membership filter: all (default), member , notMember , flagged |
userId | String | ❌ | Search channels created by specific user (admin only) |
Code Examples
Filter Options Reference
Understanding the available filter options helps you create precise channel queries:Membership Filters
Filter | Description |
---|---|
all | Search all channels (default) |
member | Search channels where user is a member |
notMember | Search channels where user is not a member |
flagged | Search channels that user has flagged |
Include Deleted Options
Value | Description |
---|---|
null | Show both active and closed channels (default) |
false | Show only active/open channels |
true | Show only closed/deleted channels |
Next Steps
Create Channels
Set up new channels with custom configurations
Get Channels
Retrieve specific channels by ID
Update Channels
Modify channel properties and settings
Search Strategy: Combine multiple filter criteria for precise results. Use tag filtering for category-based searches, membership filters for user-specific queries, and channel types to focus on specific communication patterns.