Skip to main content

Group permissions overview

These APIs help in validating if you have permissions for a gated group.

Get group permissions API

To determine if the permissions are granted to a user in a particular group.

// userAlice.chat.group.permissions(chatid)
const groupPermissions = await userAlice.chat.group.permissions(chatid);

Get group permissions parameters

ParamTypeDefaultRemarks
chatIdstring-The chatid related to that specific group. chatid are unique identifiers of the group

Note: Parameters in this style are mandatory.

Expected response
{
entry: true,
chat: true,
rules: { entry: { conditions: [] }, chat: { conditions: [] } }
}
ParamTypeRemarks
entrybooleanRefers if the Profile has access to enter the group
chatbooleanRefers if the Profile has access to chat in the group
rulesobjectModeration rules of the group