Method: people.get
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
리소스 이름을 지정하여 사람에 대한 정보를 제공합니다. people/me
를 사용하여 인증된 사용자를 나타냅니다.
'personFields'가 지정되지 않은 경우 요청에서 400 오류를 반환합니다.
HTTP 요청
GET https://people.googleapis.com/v1/{resourceName=people/*}
URL은 gRPC 트랜스코딩 구문을 사용합니다.
경로 매개변수
매개변수 |
resourceName |
string
필수 항목입니다. 정보를 제공할 사람의 리소스 이름입니다.
- 인증된 사용자에 대한 정보를 가져오려면
people/me 를 지정합니다.
- Google 계정에 관한 정보를 가져오려면
people/{account_id} 를 지정합니다.
- 연락처 정보를 가져오려면
people.connections.list 에서 반환할 연락처를 식별하는 리소스 이름을 지정합니다.
|
쿼리 매개변수
매개변수 |
requestMask (deprecated) |
object (RequestMask )
지원 중단됨(personFields 을(를) 대신 사용하세요.) 결과를 사람 필드의 하위 집합으로 제한하는 마스크입니다.
|
personFields |
string (FieldMask format)
필수 항목입니다. 개인에서 반환되는 필드를 제한하는 필드 마스크. 여러 입력란은 쉼표로 구분하여 지정할 수 있습니다. 유효한 값은 다음과 같습니다.
- addresses
- ageRanges
- 전기
- 생일
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- 이벤트
- externalIds
- 성별
- imClients
- 관심분야
- locales
- 위치
- 멤버십
- metadata
- miscKeywords
- names
- 닉네임
- 직업
- organizations
- phoneNumbers
- 사진
- 관계
- sipAddresses
- 기술
- urls
- userDefined
|
sources[] |
enum (ReadSourceType )
선택사항입니다. 반환할 소스 유형의 마스크. 설정하지 않으면 기본값은 READ_SOURCE_TYPE_PROFILE 및 READ_SOURCE_TYPE_CONTACT 입니다.
|
응답 본문
성공한 경우 응답 본문에 Person
의 인스턴스가 포함됩니다.
승인 범위
공개 데이터에 액세스하는 데 승인이 필요하지 않습니다. 비공개 데이터의 경우 다음 OAuth 범위 중 하나가 필요합니다.
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
자세한 내용은 승인 가이드를 참조하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-08-06(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 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"]]