Method: people.get
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
מספק מידע על אדם על ידי ציון שם המשאב. אפשר להשתמש ב-people/me
כדי לציין את המשתמש המאומת.
אם לא צוין 'personFields', הבקשה תחזיר שגיאה 400.
בקשת HTTP
GET https://people.googleapis.com/v1/{resourceName=people/*}
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של 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
- locations
- מינויים
- מטא נתונים
- 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 ודוגמאות הקוד הן ברישיון 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."]]],[]]