Key Benefit: Control channel access by managing member lists, enabling you to create private channels, invite specific users, and remove members when necessary.

Feature Overview

Member Management allows you to control who has access to your chat channels by adding and removing members. This feature is essential for creating private channels, managing user access, and maintaining channel security.

Add Members

Invite users to channels
  • Send channel invitations
  • Bulk member additions
  • Manage join permissions
  • Handle invitation responses

Remove Members

Remove users from channels
  • Individual member removal
  • Bulk member removal
  • Handle member departures
  • Maintain member lists
Channel Type Limitation: Member management features vary by channel type. Some operations may not be available for all channel types (Conversation, Live, Community, Broadcast).

Membership Concepts

Understanding channel membership is crucial for effective member management:
ConceptDescriptionCapabilities
Channel MembersUsers with access to the channelCan view messages, participate in conversations
Channel CreatorsUsers who created the channelFull administrative control, cannot be removed
Access ControlPermissions for joining/leavingDefines channel privacy and access rules
Membership Rules:
  • Channel creators cannot be removed from their own channels
  • Some channel types may have automatic membership rules
  • Member limits may apply based on your subscription plan

Implementation Guide

Add users to channel membershipInvite users to join channels, enabling them to participate in conversations and access channel content.

Core Operations

MethodPurposeWhen to Use
addMembersAdd users to channelInviting new participants
inviteUsersSend invitationsFormal invitation process

Code Examples

// Add 'user1' and 'user2' to this channel
do {
let success = try await channelMembership.addMembers(["user1", "user2"])
} catch {
// Handle error here
}
Best Practice: Always validate user eligibility before adding members. Consider implementing confirmation flows for bulk member additions and provide clear feedback on success/failure states.

Best Practices

Implementation Strategy: Start with basic add/remove functionality, then add validation and bulk operations. Implement real-time member monitoring for active channels and provide clear user feedback for all membership actions.