- Groups help your users to converse together in a single space. You can have three types of groups - private, public, and password protected.
- A maximum of 100000 users can be added to a single group. The following error code would be provided ERR_PLAN_QUOTA_RESTRICTION if you're trying to add members greater than the limit.
- They support typing indicators, unread count, transient messages and read receipts.
- However, once the size of the group exceeds 300, the conversations and unread message counts are not updated.
GUIDs would be automatically converted to lowercase while creating a group.
The following table lists the properties that the Group API supports.
Parameters | Type | Description |
---|---|---|
guid | string |
Allowed characters: alpha-dash (a-z, 0-9 with -and _ ) without spaces |
name | string |
It also supports emojis. |
type | string |
Allowed types are: If type is not passed, then by default public type is assigned. |
password | string |
|
icon | string |
CometChat doesn’t save the image on its servers.. There is no limit on the image resolution. It depends on the implementation. Maximum length is 3000 characters. |
description | string |
Maximum length is 255 characters. |
owner | string |
If not passed, the system user would be considered the owner of the group. |
metadata | nested object |
|
tags | array of strings |
A maximum of 25 tags can be associated with a single group. |
members | object |
It can have the below optional properties:
Failure to adding a member or banning a user does not result into create group API failure.\ However, the individual member failure can be seen in the error objects in members. If the same UID is added to more than one members array then the scope UID will get the scopes in the order below admin, moderator, participant.\ For example, if the UID superhero1 is part of admins, moderators and usersToBan arrays then it will appear in the only members.admins property in the response. A maximum of 25 users can be added across all the scopes of member objects. |
membersCount | integer | Specifies the number of members in the group. |
createdAt | integer | UNIX Timestamp specifies the time when the user was created. |
conversationId | string | Specifies the conversation ID of the group. |