Chat / JavaScript
Chat JavaScript v4
Chat JavaScript
Chat
JavaScript
Home
/
Chat
/
JavaScript
/
User
This is the new Docs for Chat SDK v4 for JavaScript. To see the previous Docs, click here.

Update user profile

You can update a user's nickname and profile image with a profile URL using the updateCurrentUserInfo() method. A user's profile image can be a JPG (.jpg), JPEG (.jpeg), or PNG (.png) file of up to 5 MB.

const params: UserUpdateParams = {
    nickname: NICKNAME,
    profileImage: PROFILE_IMAGE_FILE,       // Or use profileUrl: PROFILE_URL.
};
const user = await sb.updateCurrentUserInfo(params);