Users can be created using one of the below 3 methods:
To create the users on the go, we provide a method in the Xamarin SDK called CreateUser(). You can use the method to create a user as shown in the below code sample:
String UID = "DEMO123"; // Required String name = "Your Name"; // Required String avatarURL = ""; String profileURL = ""; String role = ""; Context context; cometchat.CreateUser(context,UID,name,avatarURL,profileURL,role,new Callbacks( success => createSuccess(success), fail => createFail(fail));
This method will create the user with the parameters passed if everything is successful and return the details of the user created in the
In case the user already exists, it will return an error message saying "User already exists".
The second option available to create a user is using the Restful APIs we provide for user management.
The third and the most simple option to create users is by creating the users via the
CometChat Administration Panel. All you need to do is login to the CometChat Admin Panel, and navigate to the
Users section in the left pane.