사용자 정보 업데이트
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>Response
{
"user": {
"id": "user123",
"username": "user123",
"profileImageUrl": "http://hello.com/1.jpg",
"data": {
"metadataKey": "metadata"
},
"updatedAt": 1583924400,
"createdAt": 1583921400
}
}Last updated