Mesibo Group Management - PIN-based Group Management

The PINs based group management allows users to add themselves to a group by using a numerical PIN. The group admin can create a PIN with the necessary permissions and publish it to users so that they can join the group. The group admin can create multiple PINs with a different set of permissions. For example, the group admin can create a PIN that only allows limited functionality (say only to receive messages or group calls), while another PIN gives full functionalities like sending and receiving messages, making groups calls, etc.

Creating a PIN

The group owner or an admin with the necessary permissions can add a PIN for the group by calling the addPin API of the group profile. If the PIN is successfully added, Mesibo_onGroupSettings callback function in the listener will be called with settings, permissions, and PINs. If not, Mesibo_onGroupError callback function in the listener will be called with an error code.

void addPin(MesiboMemberPermissions permissions, GroupListener listener, long expiry, long count)

void addPin(MesiboMemberPermissions permissions, GroupListener listener)

addPin takes the following parameters:

ParameterDescription
permissionsMember Permissions object describing permissions to grant to the member using this PIN (refer adding members description above)
listenerGroup listener instance which will be called when group settings are retrived. Note that, if you are using Javascript, you can pass listener or a callback function. For all other platforms, it is the listener.
expiryExpiry in seconds, default 0 for unlimited
countMaximum number of times this PIN can be used, default 0 for unlimited

Joing a group using a PIN

Users can add themselves to a group by calling the join API of the group profile with the PIN. If successful, Mesibo_onGroupJoined callback function in the listener will be called. If not, Mesibo_onGroupError callback function in the listener will be called with an error code.

void join(long pin, GroupListener listener)

Modifying a PIN

The group owner or an admin with the necessary permissions can modify a PIN by calling the editPin API of the group profile.

void editPin(long pin, MesiboMemberPermissions permissions, GroupListener listener, long expiry, long count)

Refer to the addPin description above for the description of the parameters.

Removing a PIN

The group owner or an admin with the necessary permissions can remove a PIN by calling the removePin API of the group profile.

void removePin(long pin)