Delete user avatar

delete
https://api.box.com/2.0
/users/:user_id/avatar

Removes an existing user avatar. You cannot reverse this operation.

Request

Bearer [ACCESS_TOKEN]
application/json

Path Parameters

stringin pathrequired
12345

The ID of the user.

Response

none
  • no_content: Removes the avatar and returns an empty response.
application/jsonClient error
  • forbidden: Returned if the user does not have necessary permissions or is not activated.
application/jsonClient error
  • not_found: Returned if the user or user avatar does not exist or cannot be found.
application/jsonClient error

An unexpected client error.

delete
Delete user avatar
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X DELETE -L "https://api.box.net/2.0/users/12345/avatar" \
     -H "Authorization: Bearer <ACCESS_TOKEN>"
.NET
bool isDeleted = await client.UsersManager.DeleteUserAvatarAsync(userId);
Java
String userID = "33333";
BoxUser user = new BoxUser(api, userID);
user.deleteAvatar();