You should create a User in CometChat to be able to initiate communication in the platform. Users can chat in either 1-1 or groups.
UIDs would be automatically converted to lowercase while creating a user.
The following table lists the properties that the User API supports.
Parameters | Type | Description |
---|---|---|
uid | string |
Allowed characters: alpha-dash (a-z, 0-9 with -and _ ) without spaces |
name | string |
|
avatar | string |
Maximum length is 3000 characters. |
link | string |
Maximum length is 3000 characters. |
role | string |
The role must be created before-hand using the create role API. If role is not passed, then default role is assigned to the user. |
metadata | nested object |
|
tags | array of strings |
Maximum of 25 tags can be associated with a single user. |
withAuthToken | boolean |
If set to true, you do not have to make a separate API call to create authToken. |
createdAt | Integer | UNIX Timestamp indicates the time when the user was created. |