AI-generated Key Takeaways
-
Retrieves information about a person, including the authenticated user using
people/meor by specifying a resource name. -
Requires the
personFieldsquery 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
GETrequest to thehttps://people.googleapis.com/v1/{resourceName=people/*}endpoint with optional query parameters. -
Response includes a Person object containing the requested information if successful.
- HTTP request
- Path parameters
- Query parameters
- Request body
- Response body
- Authorization scopes
- Try it!
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 |
Required. The resource name of the person to provide information about.
|
Query parameters
| Parameters | |
|---|---|
requestMask |
DEPRECATED (Please use A mask to restrict results to a subset of person fields. |
personFields |
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:
|
sources[] |
Optional. A mask of what source types to return. Defaults to |
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/contactshttps://www.googleapis.com/auth/contacts.readonlyhttps://www.googleapis.com/auth/contacts.other.readonlyhttps://www.googleapis.com/auth/directory.readonlyhttps://www.googleapis.com/auth/profile.agerange.readhttps://www.googleapis.com/auth/profile.emails.readhttps://www.googleapis.com/auth/profile.language.readhttps://www.googleapis.com/auth/user.addresses.readhttps://www.googleapis.com/auth/user.birthday.readhttps://www.googleapis.com/auth/user.emails.readhttps://www.googleapis.com/auth/user.gender.readhttps://www.googleapis.com/auth/user.organization.readhttps://www.googleapis.com/auth/user.phonenumbers.readhttps://www.googleapis.com/auth/userinfo.emailhttps://www.googleapis.com/auth/userinfo.profilehttps://www.googleapis.com/auth/profile.language.read
For more information, see the Authorization guide.