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.
- js
// userAlice.chat.group.permissions(chatid)
const groupPermissions = await userAlice.chat.group.permissions(chatid);
Get group permissions parameters
Param | Type | Default | Remarks |
---|---|---|---|
chatId | string | - | 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: [] } }
}
Param | Type | Remarks |
---|---|---|
entry | boolean | Refers if the Profile has access to enter the group |
chat | boolean | Refers if the Profile has access to chat in the group |
rules | object | Moderation rules of the group |