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" }, })
<input type="file" onchange="uploadFile(this)" > <script> async function uploadFile(input) { // 프로필 이미지를 업로드 await client.updateUser({ username: 'user123', // max char length: 128 image: input.files[0], data: { metadataKey: "metadata" }, }); } </script>
{ "user": { "id": "user123", "username": "user123", "profileImageUrl": "http://hello.com/1.jpg", "data": { "metadataKey": "metadata" }, "updatedAt": 1583924400, "createdAt": 1583921400 } }
Last updated 22 days ago