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