Type | Privileges | Recommended Use |
---|---|---|
Auth Key | The Auth Key can be used to create & login users. | In your client side code (during development) |
Rest API Key | The Rest API Key can be used to perform any CometChat operation. | In your server side code |
Your App | Your Server | CometChat |
---|---|---|
User registers in your app | You store the user information in your database (e.g. ID, name, email, phone, location etc. in users table) | You add the user to CometChat (only ID & name) using the Rest API |
User logs in to your app | You verify the credentials, login the user and retrieve the user ID | You log in the user to CometChat using the same user ID programmatically |
User sends a friend request | You display the request to the potential friend | No action required |
User accepts a friend request | You display the users as friends | You add both the users as friends using the Rest API |
Type | Visibility | Participation |
---|---|---|
Public | All users | Any user can choose to join |
Password | All users | Any user with a valid password can choose to join |
Private | Only users part of the group | Invited users will be auto-joined |
Member | Default | Privileges |
---|---|---|
Admin | Group creator is assigned Admin scope | - Change scope of Group Members to admin, moderator or participant. - Can add members to a group. - Kick & Ban Participants/Moderators/Admins - Send & Receive Messages & Calls - Update group - Delete group |
Moderator | - | - Change scope of moderator or participant. - Update group - Kick & Ban Participants - Send & Receive Messages & Calls |
Participant | Any other user is assigned Participant scope | - Send & Receive Messages & Calls |
Category | Description |
---|---|
message | Any message belonging to the category message can belong to either one of the below types: 1. text 2. image 3. video 4. audio 5. file |
custom | Custom messages are an option available for developers to send custom data across to users/groups. To send any additional data that does not fit in the default categories and types provided by CometChat, you can use the custom messages. |
action | Action messages are system-generated messages. These can belong to either of the below types:1. groupMember - when the action is performed on a group member 2. message - when the action is performed on a message |
call | These are call-related messages. These can belong to either one of the two types:1. audio 2. video |