Method: people.get

リソース名を指定して個人に関する情報を提供します。people/me を使用して、認証済みユーザーを示します。

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

HTTP リクエスト

GET https://people.googleapis.com/v1/{resourceName=people/*}

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

パスパラメータ

パラメータ
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
  • 開催地
  • メンバーシップ
  • メタデータ
  • miscKeywords
  • names
  • ニックネーム
  • 職業
  • organizations
  • phoneNumbers
  • 写真
  • 関係
  • sipAddresses
  • skills
  • urls
  • userDefined
sources[]

enum (ReadSourceType)

省略可。返すソースタイプのマスク。設定しない場合、デフォルトは READ_SOURCE_TYPE_PROFILEREAD_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

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