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_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
詳しくは、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は 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"]]