Add the power of the Box AI API to your custom apps at Content Cloud Summit on May 15
Learn more and register!Removes an existing user avatar. You cannot reverse this operation.
12345
The ID of the user.
no_content
: Removes the avatar and returns an empty response.forbidden
: Returned if the user does not have necessary permissions
or is not activated.not_found
: Returned if the user or user avatar does not exist
or cannot be found.An unexpected client error.
curl -i -X DELETE -L "https://api.box.net/2.0/users/12345/avatar" \
-H "authorization: Bearer <ACCESS_TOKEN>"
bool isDeleted = await client.UsersManager.DeleteUserAvatarAsync(userId);
String userID = "33333";
BoxUser user = new BoxUser(api, userID);
user.deleteAvatar();
client.user('33333').delete_avatar()
client.users.deleteAvatar('22222', () => {
console.log('User avatar deleted!');
});
client.users.deleteAvatar(userId: "33333") { result in
guard case .success = result else {
print("Error deleting avatar")
return
}
print("Avatar successfully deleted")
}
await client.avatars.deleteUserAvatar(user.id);
client.avatars.delete_user_avatar(user.id)
await client.Avatars.DeleteUserAvatarAsync(userId: user.Id);