Method: people.getBatchGet
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
요청된 리소스 이름 목록을 지정하여 특정 사용자 목록에 대한 정보를 제공합니다. people/me
를 사용하여 인증된 사용자를 나타냅니다.
'personFields'가 지정되지 않은 경우 요청에서 400 오류가 반환됩니다.
HTTP 요청
GET https://people.googleapis.com/v1/people:batchGet
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
매개변수 |
resourceNames[] |
string
필수 항목입니다. 정보를 제공할 사용자의 리소스 이름입니다. 반복할 수 있습니다. URL 쿼리 매개변수는 다음과 같아야 합니다.
resourceNames=<name1>&resourceNames=<name2>&...
- 인증된 사용자에 대한 정보를 가져오려면
people/me 를 지정하세요.
- Google 계정에 대한 정보를 가져오려면
people/{account_id} 를 지정합니다.
- 연락처에 대한 정보를 가져오려면
people.connections.list 에서 반환된 연락처를 식별하는 리소스 이름을 지정합니다.
최대 200개의 리소스 이름을 사용할 수 있습니다.
|
requestMask (deprecated) |
object (RequestMask )
지원 중단됨 (대신 personFields 사용) 결과를 사용자 필드의 하위 집합으로 제한하는 마스크입니다.
|
personFields |
string (FieldMask format)
필수 항목입니다. 각 사용자의 어떤 필드가 반환되는지를 제한하는 필드 마스크입니다. 여러 필드를 쉼표로 구분하여 지정할 수 있습니다. 유효한 값은 다음과 같습니다.
- addresses
- ageRanges
- 전기
- 생일
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- 이벤트
- externalIds
- 성별
- imClients
- 관심분야
- locales
- 위치
- 멤버십
- 메타데이터
- miscKeywords
- 이름
- 닉네임
- 직업
- organizations
- phoneNumbers
- 사진
- 관계
- sipAddresses
- 기술
- URL
- userDefined
|
sources[] |
enum (ReadSourceType )
선택사항입니다. 반환할 소스 유형의 마스크입니다. 설정하지 않으면 기본값은 READ_SOURCE_TYPE_CONTACT 및 READ_SOURCE_TYPE_PROFILE 입니다.
|
응답 본문
리소스 이름별 사용자 목록 가져오기 요청에 대한 응답입니다.
성공한 경우 응답 본문은 다음과 같은 구조의 데이터를 포함합니다.
필드 |
responses[] |
object (PersonResponse )
요청된 각 리소스 이름에 대한 응답입니다.
|
승인 범위
공개 데이터에 액세스하는 데 승인이 필요하지 않습니다. 비공개 데이터의 경우 다음 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-11-08(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-11-08(UTC)"],[[["Retrieves information about a list of specific people, including the authenticated user, by specifying resource names."],["Requires the `personFields` query parameter to specify desired data fields and returns a 400 error if it's missing."],["Supports various authorization scopes for accessing private data, although public data requires no authorization."],["Returns a JSON response containing an array of `PersonResponse` objects, each corresponding to a requested resource name."],["Uses the `GET` HTTP method and the `https://people.googleapis.com/v1/people:batchGet` endpoint with gRPC Transcoding syntax."]]],["This outlines how to retrieve information about specific people using the `people:batchGet` endpoint via a `GET` HTTP request. You must provide `resourceNames` (up to 200) in the query, identifying each person (e.g., `people/me` or `people/{account_id}`). The `personFields` parameter is required to specify which person attributes to include. The request body is empty. The response returns an array of `PersonResponse` objects, one for each requested resource name, and requires authorization scopes for private data. A 400 error is returned if 'personFields' are not provided.\n"]]