/ SDKs / JavaScript
Chat SDKs JavaScript v4
Chat SDKs JavaScript
Chat SDKs
Version 4

Update user profile

Copy link

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 = {
    nickname: NICKNAME,
    profileImage: PROFILE_IMAGE_FILE,       // Or use profileUrl: PROFILE_URL.
const user = await sb.updateCurrentUserInfo(params);