A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.
Removes an existing user avatar. You cannot reverse this operation.
12345The 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>"await client.avatars.deleteUserAvatar(user.id);client.avatars.delete_user_avatar(user.id)await client.Avatars.DeleteUserAvatarAsync(userId: user.Id);try await client.avatars.deleteUserAvatar(userId: user.id)client.getAvatars().deleteUserAvatar(user.getId())String userID = "33333";
BoxUser user = new BoxUser(api, userID);
user.deleteAvatar();client.user('33333').delete_avatar()bool isDeleted = await client.UsersManager.DeleteUserAvatarAsync(userId);client.users.deleteAvatar('22222', () => {
console.log('User avatar deleted!');
});