Join channels
Requires App Context
Enable App Context on your keyset in the Admin Portal to manage memberships.
Create a channel membership for the current user with JoinChannel(). This records the user as a channel member and returns the created Membership object.
Two-step pattern
JoinChannel() only creates the membership. To start receiving messages, you must also call Connect() separately.
Method naming
Earlier versions used Join() to create a membership and automatically start listening for messages. JoinChannel() supersedes Join() by separating membership creation from message subscription. Join() remains available but is deprecated.
Method signature
This method has the following signature:
1channel.JoinChannel(ChatMembershipData? membershipData = null)
Input
* required
| Parameter | Description |
|---|---|
membershipDataType: ChatMembershipDataDefault: null | Optional membership metadata (custom data, status, type). |
Output
| Type | Description |
|---|---|
Task<ChatOperationResult<Membership>> | Returned Task containing the created Membership object. |
Sample code
Join the support channel and start receiving messages.
1