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

למידע נוסף, עיינו במדריך ההרשאות.