Method: people.updateContactPhoto

Update a contact's photo.

HTTP request

PATCH https://people.googleapis.com/v1/{resourceName=people/*}:updateContactPhoto

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
resourceName

string

Person resource name

Request body

The request body contains data with the following structure:

JSON representation
{
  "photoBytes": string,
  "personFields": string
}
Fields
photoBytes

string (bytes format)

Raw photo bytes

A base64-encoded string.

personFields

string (FieldMask format)

Optional. Not specifying any fields will skip the post mutate read. A field mask to restrict which fields on the person are returned. Multiple fields can be specified by separating them with commas. Valid values are:

  • addresses
  • ageRanges
  • biographies
  • birthdays
  • braggingRights
  • coverPhotos
  • emailAddresses
  • events
  • genders
  • imClients
  • interests
  • locales
  • memberships
  • metadata
  • names
  • nicknames
  • occupations
  • organizations
  • phoneNumbers
  • photos
  • relations
  • relationshipInterests
  • relationshipStatuses
  • residences
  • sipAddresses
  • skills
  • taglines
  • urls
  • userDefined

Response body

If successful, the response body contains data with the following structure:

The response for updating a contact's photo.

JSON representation
{
  "person": {
    object (Person)
  }
}
Fields
person

object (Person)

The updated person, if personFields is set in the UpdateContactPhotoRequest; otherwise this will be unset.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/contacts

For more information, see the Authorization guide.

Try it!