Skip to main content
A user is anyone who uses CometChat. The primary aim for the users functionality is to allow you to quickly retrieve and add users to CometChat.

UID

  • Each user is uniquely identified using a UID.
  • The UID is typically the primary ID of the user from your database.
UID can be alphanumeric with underscore and hyphen. Spaces, punctuation and other special characters are not allowed.

Auth Token

  • A single user can have multiple auth tokens. Auth tokens should be per user per device.
  • It should be generated via a server-to-server API call. The auth token should then be passed to CometChat for login.
  • An Auth Token can only be deleted via the dashboard or using the REST API.

User Roles

A role is a category for a group of similar users. For example, you may want to group your premium users using the role “Premium”. You then use this to filter users or enable/disable features by writing conditional code.

User List

  • The User List can be used to build the Contacts or Who’s Online view in your app.
  • The list of users can be different based on the logged-in user.

Next Steps