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 namedescription
- user's descriptionavatarFile
- file ID of the user's avataravatarCustomUrl
- custom url of the user's avatarmetadata
- user's metadata
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:
AmityFileRepository
AmityFileRepository
Step 2 — Passing AmityImageData
from step 1 into the builder, and call user update API.
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.
Note: getAvatarInfo
provides the information associated with a particular Avatar
Last updated
Was this helpful?