Method: people.getBatchGet

Provides information about a list of specific people by specifying a list of requested resource names. Use people/me to indicate the authenticated user.
The request throws a 400 error if 'personFields' is not specified.

HTTP request

GET https://people.googleapis.com/v1/people:batchGet

The URL uses gRPC Transcoding syntax.

Query parameters

Parameters
resourceNames

string

Required. The resource names of the people to provide information about.

  • To get information about the authenticated user, specify people/me.
  • To get information about a google account, specify people/account_id.
  • To get information about a contact, specify the resource name that identifies the contact as returned by people.connections.list.

You can include up to 50 resource names in one request.

requestMask

object (RequestMask)

DEPRECATED (Please use personFields instead)

A mask to restrict results to a subset of person fields.

personFields

string (FieldMask format)

Required. A field mask to restrict which fields on each 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

Request body

The request body must be empty.

Response body

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

JSON representation
{
  "responses": [
    {
      object (PersonResponse)
    }
  ]
}
Fields
responses[]

object (PersonResponse)

The response for each requested resource name.

Authorization Scopes

No authorization required to access public data. For private data, one of the following OAuth scopes is required:

  • https://www.googleapis.com/auth/contacts
  • https://www.googleapis.com/auth/contacts.readonly
  • https://www.googleapis.com/auth/profile.agerange.read
  • https://www.googleapis.com/auth/profile.emails.read
  • https://www.googleapis.com/auth/profile.language.read
  • https://www.googleapis.com/auth/user.addresses.read
  • https://www.googleapis.com/auth/user.birthday.read
  • https://www.googleapis.com/auth/user.emails.read
  • https://www.googleapis.com/auth/user.organization.read
  • https://www.googleapis.com/auth/user.phonenumbers.read
  • https://www.googleapis.com/auth/userinfo.email
  • https://www.googleapis.com/auth/userinfo.profile

For more information, see the Authorization guide.

PersonResponse

The response for a single person

JSON representation
{
  "httpStatusCode": number,
  "person": {
    object (Person)
  },
  "requestedResourceName": string,
  "status": {
    object (Status)
  }
}
Fields
httpStatusCode
(deprecated)

number

DEPRECATED (Please use status instead)

HTTP 1.1 status code.

person

object (Person)

The person.

requestedResourceName

string

The original requested resource name. May be different than the resource name on the returned person.

The resource name can change when adding or removing fields that link a contact and profile such as a verified email, verified phone number, or a profile URL.

status

object (Status)

The status of the response.

Try it!