This guide explains the core Sendbird developer concept of users in Sendbird Chat. It will discuss how to work with the Sendbird SDK and user objects to create, update, and delete users. These activities are fundamental to Sendbird integration and a good stepping stone to comprehensive Sendbird development mastery.
Let’s get started!
At the center of the Sendbird experience are users — entities that connect to Sendbird Chat or Calls via Sendbird’s client-side SDK.
Here are a few important things to know about creating users:
With this in mind, let’s understand a bit more about the Sendbird SDK and user objects before creating users.
When starting Sendbird development, users can be logged in without authentication. However, in production, the best practice is to use authentication (access or session tokens). We recommend reasonably short-lived session tokens for the most secure setup.
You can control user access permissions by going to the Sendbird Dashboard > Settings > Security.
Note that from the SDK, by default, a user can update:
Sendbird also offers the ability to restrict the above preferences to only allow updates to come from the Platform API.
Ready to create users? Keep reading!
See this guide to understand how to create users via a Platform API call.
When starting out, manually create 10 users, with sequential IDs, in the dashboard. User nicknames should be identical to user IDs.
Users are listed in order of newest to oldest created. Click on any user ID to drill down for more details.
You can also search for users using the ID, the Nickname, or Nickname startswith.
By default, you can fetch 100 application users at a time via the SDK. It’s also possible to categorize the users via their metadata, then fetch categorized users with a metadata filter.This default action can be turned off if your security policy prohibits users from fetching all other users.
Select a user’s ID to view and update the user’s profile.
A user can only update their profile image and nickname via Sendbird’s SDKs.
All aspects of a user object (profile) can be updated via Platform API, including:
It’s possible to delete users one by one or many at a time via the dashboard. Once a user is deleted, the same user ID can be used to create another user.
Sendbird’s SDKs do not provide a “delete user” option.
Deleting users one by one via Platform API is also possible.
This guide discussed how to create and work with users via the Sendbird SDK. These basics should create a great foundation for your development efforts. Thanks for using Sendbird to create great chat applications and helping to connect people better! Happy chat building! 👩💻
Stay up-to-date on the latest technical content from Sendbird.