Update User Information

You can update username and profile image URL.

You can enter up to 5 key-value pairs in data field. The maximum size of key is 128 characters and the maximum size of value is 1024 characters. Both key and value must be strings.

await client.updateUser({
    username: 'user123', // max char length: 128
    profileImageUrl:'http://hello.com/1.jpg',
    data: {
      metadataKey: "metadataValue"
    },
})

Response

{
  "user": {
    "id": "user123",
    "username": "user123",
    "profileImageUrl": "http://hello.com/1.jpg",
    "data": {
      "metadataKey": "metadata"
    },
    "updatedAt": 1583924400,
    "createdAt": 1583921400
  }
}

Last updated