Method: people.getBatchGet

リクエストされたリソース名のリストを指定して、特定のユーザーのリストに関する情報を提供します。people/me を使用して、認証されたユーザーを指定します。

「personFields」が指定されていない場合、リクエストは 400 エラーを返します。

HTTP リクエスト

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

この URL は gRPC Transcoding 構文を使用します。

クエリ パラメータ

パラメータ
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
  • 名前
  • ニックネーム
  • 職業
  • 組織
  • phoneNumbers
  • 写真
  • 関係
  • sipAddresses
  • skills
  • URL
  • userDefined
sources[]

enum (ReadSourceType)

省略可。返されるソースタイプのマスク。設定しない場合のデフォルトは READ_SOURCE_TYPE_CONTACTREAD_SOURCE_TYPE_PROFILE です。

リクエスト本文

リクエストの本文は空にする必要があります。

レスポンスの本文

リソース名ごとのユーザーのリストを取得する Get リクエストに対するレスポンス。

成功した場合、レスポンスの本文には次の構造のデータが含まれます。

JSON 表現
{
  "responses": [
    {
      object (PersonResponse)
    }
  ]
}
フィールド
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

詳しくは、認可ガイドをご覧ください。