Skip to main content
Quick Reference for AI Agents & Developers
  • Create user: CometChat.createUser(user:apiKey:onSuccess:onError:)
  • Get user: CometChat.getUser(UID:onSuccess:onError:)
  • List users: UsersRequest.UsersRequestBuilder().build()usersRequest.fetchNext(onSuccess:onError:)
  • Block/unblock: CometChat.blockUsers(_:onSuccess:onError:), CometChat.unblockUsers(_:onSuccess:onError:)
  • Related: User Management · Retrieve Users · Block Users
The primary aim for our users’ functionality is to allow you to quickly retrieve and add users to CometChat. You can begin with user management to sync your users to CometChat. Once that is done, you can retrieve users and display them in your app.

User Data Model

The User class represents a CometChat user with all their profile information.

Creating a User Object

User Properties

* uid is specified on user creation and not editable after that

UserStatus Enum

UID Requirements

Common Error Codes