Retrieves an image of a the user's avatar.
This operation is performed by calling function getUserAvatar
.
See the endpoint docs at API Reference.
client.getAvatars().getUserAvatar(user.getId())
- userId
String
- The ID of the user. Example: "12345"
- headers
GetUserAvatarHeaders
- Headers of getUserAvatar method
This function returns a value of type InputStream
.
When an avatar can be found for the user the image data will be returned in the body of the response.
Adds or updates a user avatar.
This operation is performed by calling function createUserAvatar
.
See the endpoint docs at API Reference.
client.getAvatars().createUserAvatar(user.getId(), new CreateUserAvatarRequestBody.CreateUserAvatarRequestBodyBuilder(decodeBase64ByteStream("iVBORw0KGgoAAAANSUhEUgAAAQAAAAEAAQMAAABmvDolAAAAA1BMVEW10NBjBBbqAAAAH0lEQVRoge3BAQ0AAADCoPdPbQ43oAAAAAAAAAAAvg0hAAABmmDh1QAAAABJRU5ErkJggg==")).picFileName("avatar.png").picContentType("image/png").build())
- userId
String
- The ID of the user. Example: "12345"
- requestBody
CreateUserAvatarRequestBody
- Request body of createUserAvatar method
- headers
CreateUserAvatarHeaders
- Headers of createUserAvatar method
This function returns a value of type UserAvatar
.
ok
: Returns thepic_urls
object with URLs to existing user avatars that were updated.*created
: Returns thepic_urls
object with URLS to user avatars uploaded to Box with the request.
Removes an existing user avatar. You cannot reverse this operation.
This operation is performed by calling function deleteUserAvatar
.
See the endpoint docs at API Reference.
client.getAvatars().deleteUserAvatar(user.getId())
- userId
String
- The ID of the user. Example: "12345"
- headers
DeleteUserAvatarHeaders
- Headers of deleteUserAvatar method
This function returns a value of type void
.
no_content
: Removes the avatar and returns an empty response.