/ SDKs / Unity
SDKs
Chat SDKs Unity v4
Chat SDKs Unity
Chat SDKs
Unity
Version 4

Invite users as members

Copy link

To enter a private group channel, a user must be invited by members who are already in the group channel. On the other hand, an invitation isn't required to join a public group channel. Only members of a group channel can invite new users to the channel.

You can also determine whether the newly invited user can see past messages in the channel or not. You can manage the settings on Sendbird Dashboard. Go to Settings > Chat > Channels > Group channels, and you will see the Chat history option. If the option is turned on, newly joined members can view all messages sent before they joined the channel. If turned off, new members can only see messages sent after they were invited. By default, this option is turned on.

groupChannel.Invite( new List { "jane", "young" }, (inError) =>
{
if (inError != null)
return; 
// Handle error.
});

List of properties

Copy link
Property nameTypeDescription

inUserIds

List<string>

Specifies the list of user IDs to invite to the channel.