createUser()
method. This method takes a User
object and the API Key
as input parameters and returns the created User
object if the request is successful.
For more details on the fields present in the User class, please check this
updateUser()
method. This method takes a User
object and the API Key as inputs and returns the updated User
object on successful execution of the request.
User
object provided to the updateUser()
method has the UID
of the user to be updated set.
User
object as input and returns the updated User
object on the successful execution of the request.
updateCurrentUserDetails()
method one can only update the logged-in user irrespective of the UID passed. Also, it is not possible to update the role of a logged-in user.
Field | Editable | Information |
---|---|---|
uid | specified on user creation. Not editable after that | Unique identifier of the user |
name | Yes | Display name of the user |
avatar | Yes | URL to profile picture of the user |
link | Yes | URL to profile page |
role | Yes | User role of the user for role based access control |
metadata | Yes | Additional information about the user as JSON |
status | No | Status of the user. Could be either online/offline |
statusMessage | Yes | Any custom status message that needs to be set for a user |
lastActiveAt | No | The unix timestamp of the time the user was last active. |
hasBlockedMe | No | A boolean that determines if the user has blocked the logged in user |
blockedByMe | No | A boolean that determines if the logged in user has blocked the user |
tags | Yes | A list of tags to identify specific users |