Admin SDK

Users.photos

For a list of methods for this resource, see the end of this page.

Resource representations

The following JSON template is used for User.photos resources in the Directory API:

{
  "kind": "admin#directory#user#photo",
  "id": string,
  "etag": etag,
  "primaryEmail": string,
  "mimeType": string,
  "height": integer,
  "width": integer,
  "photoData": bytes
}
Property name Value Description Notes
etag etag ETag of the resource.
height integer Height of the photo in pixels. writable
id string The ID the API uses to uniquely identify the user.
kind string The type of the API resource. For Photo resources, this is admin#directory#user#photo.
mimeType string The MIME type of the photo. Allowed values are JPEG, PNG, GIF, BMP, TIFF, and web-safe base64 encoding. writable
photoData bytes The user photo's upload data in web-safe Base64 format in bytes. This means:
  • The slash (/) character is replaced with the underscore (_) character.
  • The plus sign (+) character is replaced with the hyphen (-) character.
  • The equals sign (=) character is replaced with the asterisk (*).
  • For padding, the period (.) character is used instead of the RFC-4648 baseURL definition which uses the equals sign (=) for padding. This is done to simplify URL-parsing.
  • Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels.
writable
primaryEmail string The user's primary email address.
width integer Width of the photo in pixels. writable

Methods

delete
Removes the user's photo.
get
Retrieves the user's photo.
patch
Adds a photo for the user. This method supports patch semantics.
update
Adds a photo for the user.

Authentication required

You need to be signed in with Google+ to do that.

Signing you in...

Google Developers needs your permission to do that.