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
  • カバー写真
  • emailAddresses
  • 予定
  • externalId
  • 性別
  • imClients
  • 関心
  • locales
  • 場所
  • メンバーシップ
  • metadata
  • その他のキーワード
  • names
  • ニックネーム
  • 職業
  • organizations
  • phoneNumbers
  • 写真
  • リレーション
  • SipAddress
  • skills
  • URL
  • ユーザー定義
sources[]

enum (ReadSourceType)

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

リクエスト本文

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

レスポンスの本文

成功すると、レスポンスの本文に次の構造のデータが含まれます。

リソース名によるリスト取得リクエストに対するレスポンス。

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/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

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