Get Started: Group Messaging

Estimated reading time: 5 minutes

In this part, we will learn about group messaging.


You MUST go through the following prerequisites before you read further.

  • Read the First App Guide.
  • Read one of the Android, iOS, JS section of this tutorial.


Understanding Group Management APIs

mesibo allows you to create groups having a set of users as group members. Once you create a group, you can send messages to the group, and all the group members will receive the messages. You can create groups of any size without any restrictions.

To use group messaging, you only need to perform the following:

  • Create a group

  • Add members

  • Start sending messages

There are various kinds of group messaging possible with mesibo, to categorize a few:

  • Normal group: any group member can send and receive messages to a group.

  • Restricted group: only selected group members can send messages to a group and selected group members can receive messages from the group. Senders and receivers can be a disjoint set.

  • Broadcast group: only the admin can send messages to the group.

  • Public Rooms: anyone can message, even non-members.

  • Round-robin (hunt): only one group member from the group will receive the message in round-robin fashion. This is quite useful for creating specialized groups; for example, in a group of support staff, only one of them will receive a message from a customer.

However, instead of hardcoding group types, mesibo allows you to specify the sending and receiving behavior of the group and individual group members for greater flexibility, for example,

  • Anyone can send
  • Members can send
  • Only selected members can send
  • Only Selected Members can receive
  • Members can receive
  • One of the active members can receive, etc

You can dynamically change the group or the member behavior at any point in time and it will be instantly applied to the group or group member(s).

Creating a Group

You can create a group either using Mesibo Backend APIs(recommended) or in the console. To develop a real app, you may need to dynamically create groups and modify them, for which you can only use REST-based backend APIs. Here, we will describe both the methods for creating a group - using REST APIs as well as using the console.

Creating a group using REST API

You need to use Group Management REST APIs.

To create a group, invoke the backend API with the following parameters:

  • op = “groupadd”
  • token = Application Token obtained from mesibo console
  • name = Group Name [Optional]
  • flag = Group Flags (described below)
  • expiry = Expiry in seconds, default 1 year
  • expiryext = Auto extend expiry on group activity, in seconds. Default disabled.
  • active = 1 to enable, 0 to disable Group Flags can be a logical OR combination of one or more flags value below:

  • 0 - normal group, only members can send
  • 1 - only selected members can send (refer add members API below)
  • 2 - anyone can send
  • 0x10 - only selected members can receive (refer add members API below)
  • 0x20 - received by one member in the round-robin fashion
  • 0x40 - do no store group messages
  • 0x80 - loop back to the sender

Response Fields

response[‘group’][‘gid’] = Group ID (GID)


If you have hosted the mesibo backend at use that as the REST endpoint.

If group creation is successful, you should receive a response that looks like below

{..<truncated>.. ,"group":{"gid":102529},"op":"groupadd","result":true}

In the above example, we have created a group with the group-id 102529. Make note of this. You can save this group-id and other group information in your database so that you can access it later. To perform any kind of group management operations like adding or deleting members, changing group permissions, etc. you will need a valid group-id.

Add Group Members using REST API

Now you can add Group Members using GID obtained in that you obtained when you created the group.

  • op = “groupeditmembers”
  • token = Application Token obtained from mesibo console
  • gid = Group ID (GID)
  • m = comma-separated list of user addresses to add or remove in the group
  • cs = 1 if members being added can send messages to the group, 0 for not
  • cr = 1 if members being added can receive group messages, 0 for not
  • canpub = [group calling] 1 if members being added can make (publish) group voice or video calls, 0 for not
  • cansub = [group calling] 1 if members being added can subscribe to group voice or video calls, 0 for not
  • canlist = [group calling] 1 if members being added can get a list of active callers in the group, 0 for not
  • delete = 0 to add members, 1 to remove members

You can only add valid users to the group. So, before you proceed ensure you have created users

For example, to add members with address member1, member2, member3 to the group with group-id 102529 invoke the API as follows:,member2,member3&delete=0

Now, we will learn how to create a group and manage it from the mesibo console.

Creating a Group in mesibo console

To create a new group, click on the + NEW GROUP button. Give a group name - example Mesibo Group and click onCreate. Your group with the name ConferenceGroup should now be created and be displayed in the table. Click on the edit icon, under actions. This will open the Group Settings page. Replicate settings shown below.

Group Permissions

Adding users to your Group in mesibo console

Click on the + NEW MEMBER button and enter the user address whom you wish to add. Click on Add. The Members table will now display the member you just added. Similarly, add more users.

The users you add should be existing mesibo users. Otherwise, create those users before you try to add them.

Group Members

mesibo, android, ios, js