Managing Members with the Client SDK

This guide covers how to manage Members with the Vonage Client SDK. Before you begin, make sure you added the SDK to your app and created a Session (Android, iOS, JS).

When a User joins a Conversation they become a Member. A membership is a mapping between a User, a Channel, and a Conversation. For example, a User called "Alice", will become a Member in a Conversation named "Chat", via the "App" channel.

Member actions such inviting and listing Members are possible by any User with a Conversation ID. To control which Users can perform these actions, restrict via ACLs on the JWT.

Joining a Conversation

Given a Conversation ID, you are able to join a Conversation. Joining creates a Member in the Conversation with the JOINED state. After this, you can send and receive messages. When joining a Conversation via the Client SDK, the channel is set to "App"

Inviting to a Conversation

Given a Conversation ID and the username of another User, you can invite them to a Conversation. On Android and iOS, a push notification will be sent to the registered devices of the invited User.

Leaving a Conversation

Given a Conversation ID, you are able to leave a Conversation. Leaving a Conversation updates the existing Member's state to LEFT.

Getting Conversation Members

Given a Conversation ID of a Conversation where you are a Member, you can get all Members of that Conversation. You can optionally pass in some parameters to configure the response, if not the default values will be used. This method returns a paginated response. If you are unfamiliar with pagination, view the pagination guide.

You can set:

  • Order
  • Page Size
  • A cursor

Getting A Conversation Member

Given a Conversation ID and Member ID, you can get a full Member object. If you would like to get your Member object, you can set the memberId parameter to "me".

Getting A Conversation Member Events

You can receive all Conversation Member Events in your application by setting up an Event Listener/Delegate Function. Here you can check the kind of incoming Member Event.