Method: people.get
Stay organized with collections
Save and categorize content based on your preferences.
Provides information about a person by specifying a resource name. Use people/me
to indicate the authenticated user.
The request returns a 400 error if 'personFields' is not specified.
HTTP request
GET https://people.googleapis.com/v1/{resourceName=people/*}
The URL uses gRPC Transcoding syntax.
Path parameters
Parameters |
resourceName |
string
Required. The resource name of the person 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 .
|
Query parameters
Parameters |
requestMask (deprecated) |
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 the person are returned. Multiple fields can be specified by separating them with commas. Valid values are:
- addresses
- ageRanges
- biographies
- birthdays
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- events
- externalIds
- genders
- imClients
- interests
- locales
- locations
- memberships
- metadata
- miscKeywords
- names
- nicknames
- occupations
- organizations
- phoneNumbers
- photos
- relations
- sipAddresses
- skills
- urls
- userDefined
|
sources[] |
enum (ReadSourceType )
Optional. A mask of what source types to return. Defaults to READ_SOURCE_TYPE_PROFILE and READ_SOURCE_TYPE_CONTACT if not set.
|
Request body
The request body must be empty.
Response body
If successful, the response body contains an instance of Person
.
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/contacts.other.readonly
https://www.googleapis.com/auth/directory.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.gender.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
https://www.googleapis.com/auth/profile.language.read
For more information, see the Authorization guide.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-08-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-06 UTC."],[[["Retrieves information about a person, including the authenticated user using `people/me` or by specifying a resource name."],["Requires the `personFields` query parameter to specify which fields to include in the response, otherwise, it returns a 400 error."],["Allows filtering the source of the data using the `sources[]` parameter and supports various authorization scopes for accessing private data."],["Uses a `GET` request to the `https://people.googleapis.com/v1/{resourceName=people/*}` endpoint with optional query parameters."],["Response includes a [Person](/people/api/rest/v1/people#Person) object containing the requested information if successful."]]],["This outlines how to retrieve person information via a `GET` request to `https://people.googleapis.com/v1/{resourceName=people/*}`. The `resourceName` path parameter specifies the person (e.g., `people/me` for the authenticated user). The `personFields` query parameter is mandatory and dictates the data returned. The request body must be empty. A successful request returns a `Person` resource. Authorization is needed for private data. A `400` error is returned if `personFields` is not specified.\n"]]