Update User Information

Update User Information

Update current user information, including display name, avatar, user description, metadata, etc., using the updateUser method in the 'amityClient' class. This method updateUser accepts these optional parameters:

The method accepts the following optional parameters:

  • displayName - user's display name

  • description - user's description

  • avatarFile - file ID of the user's avatar

  • avatarCustomUrl - custom url of the user's avatar

  • roles - user's role

  • metadata - user's metadata

Update the current user data

Update Current User's Avatar

You can upload an image and set it as an avatar for the current user.

First, you need to upload image using AmityFileRepository and then update the image info.

Step 1 — Upload an image:

Create AmityFileRepository
Upload an image with AmityFileRepository

Step 2 — Passing AmityImageData from step 1 into the builder, and call user update API.

Update the current user avatar

If you have an avatar present in your current system/server and just want to integrate that existing avatar to AmitySDK, you can just set the URL for the avatar directly.

Update user custom avatar

Note: getAvatarInfo provides the information associated with a particular Avatar

Last updated

#3026: New Content: Technical FAQ

Change request updated