Documentation Index
Fetch the complete documentation index at: https://cometchat-22654f5b-docs-android-v6-beta2.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
AI Integration Quick Reference
AI Integration Quick Reference
.public | .password | .private
Member scopes: .admin | .moderator | .participantcreateGroup(), or create one and add members in a single call with createGroupWithMembers(). See the Group Class reference at the bottom for all available fields.
Create a Group
UsecreateGroup() to create a new group. Pass a Group object with the group details.
| Group Type | Constant | Description |
|---|---|---|
| Public | .public | Any user can join |
| Password | .password | Users must provide the correct password |
| Private | .private | Users must be added by an admin/moderator |
- Swift
- Objective C
| Parameter | Description |
|---|---|
| group | An instance of Group class |
Group object with the created group’s details.
Add Members While Creating a Group
UsecreateGroupWithMembers() to create a group and add members in one operation.
Parameters:
group— TheGroupobjectmembers— Array ofGroupMemberobjects to addbanMembers— Array of UIDs to ban (can be empty)
GroupMember with: GroupMember(UID:groupMemberScope:)
- Swift
group— The createdGroupobjectmembers— Object with UIDs as keys and"success"or error message as values
Group Class
TheGroup object has the following fields. Fields marked “Yes” in the Editable column can be modified after creation using updateGroup().
| Field | Editable | Information |
|---|---|---|
| guid | Needs to be specified at group creation. Cannot be edited later | A unique identifier for a group |
| name | Yes | Name of the group |
| type | No | Type of the group: Can be 1. Public 2. Password 3. Private |
| password | No | Password for the group in case the group is of type password. |
| icon | Yes | An URL to group icon |
| description | Yes | Description about the group |
| owner | Yes | UID of the owner of the group. |
| metadata | Yes | Additional data for the group as Dictionary |
| createdAt | No | The unix timestamp of the time the group was created |
| updatedAt | No | The unix timestamp of the time the group was last updated |
| hasJoined | No | A boolean to determine if the logged in user is a member of the group. |
| joinedAt | No | The unix timestamp of the time the logged in user joined the group. |
| scope | Yes | Scope of the logged in user. Can be: 1. Admin 2. Moderator 3. Participant |
| membersCount | No | The number of members in the groups |
| tags | Yes | A list of tags to identify specific groups. |
Next Steps
Join a Group
Join public, private, or password-protected groups
Add Members
Add users to an existing group
Retrieve Groups
Fetch and filter group lists
Groups Overview
Overview of all group management features