Method: people.get
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
संसाधन का नाम बताकर किसी व्यक्ति के बारे में जानकारी देता है. पुष्टि किए गए उपयोगकर्ता की जानकारी देने के लिए, people/me
का इस्तेमाल करें.
अगर 'personFields' तय नहीं है, तो अनुरोध 400 गड़बड़ी वाला मैसेज दिखाता है.
एचटीटीपी अनुरोध
GET https://people.googleapis.com/v1/{resourceName=people/*}
यह यूआरएल gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
पाथ के पैरामीटर
पैरामीटर |
resourceName |
string
ज़रूरी है. उस व्यक्ति के संसाधन का नाम जिसके बारे में जानकारी देनी है.
- पुष्टि किए गए उपयोगकर्ता के बारे में जानकारी पाने के लिए,
people/me बताएं.
- किसी Google खाते के बारे में जानकारी पाने के लिए,
people/{account_id} बताएं.
- किसी संपर्क के बारे में जानकारी पाने के लिए, संसाधन का वह नाम बताएं जिससे संपर्क की पहचान,
people.connections.list से मिले संपर्क के तौर पर होती है.
|
क्वेरी पैरामीटर
पैरामीटर |
requestMask (deprecated) |
object (RequestMask )
रोक दी गई (कृपया इसके बजाय personFields का इस्तेमाल करें) व्यक्ति फ़ील्ड के सबसेट के नतीजों को सीमित करने के लिए मास्क.
|
personFields |
string (FieldMask format)
ज़रूरी है. फ़ील्ड मास्क, ताकि यह तय किया जा सके कि व्यक्ति के कौनसे फ़ील्ड वापस दिखाए जाएं. एक से ज़्यादा फ़ील्ड को कॉमा लगाकर अलग करके, उन्हें तय किया जा सकता है. मान्य मान हैं:
- पते
- ageRanges
- जीवनियां
- जन्मदिन
- calendarUrls
- clientData
- coverPhotos
- emailAddresses
- इवेंट
- externalIds
- लिंग
- imClients
- दिलचस्पियां
- locales
- जगहें
- की पैसे चुकाकर ली जाने वाली सदस्यताएं
- मेटाडेटा
- miscKeywords
- names
- प्रचलित नाम
- व्यवसाय
- organizations
- phoneNumbers
- फ़ोटोज
- संबंध
- sipAddresses
- कौशल
- 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
ज़्यादा जानकारी के लिए, अनुमति देने से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 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"]]