Method: userProfiles.get
הפונקציה מחזירה פרופיל משתמש.
השיטה הזו מחזירה את קודי השגיאה הבאים:
PERMISSION_DENIED
אם למשתמש המבקש אין הרשאה לגשת לפרופיל המשתמש הזה, אם אין פרופיל עם המזהה המבוקש או בגלל שגיאות גישה.
בקשת HTTP
GET https://classroom.googleapis.com/v1/userProfiles/{userId}
כתובת ה-URL משתמשת בתחביר של Transcoding של gRPC.
פרמטרים של נתיב
פרמטרים |
userId |
string
המזהה של הפרופיל להחזרה. המזהה יכול להיות אחד מהערכים הבאים:
- המזהה המספרי של המשתמש
- כתובת האימייל של המשתמש
- מחרוזת הליבה
"me" , שמציינת את המשתמש ששלח את הבקשה
|
גוף הבקשה
גוף הבקשה חייב להיות ריק.
גוף התשובה
אם הפעולה מצליחה, גוף התגובה מכיל מופע של UserProfile
.
היקפי הרשאה
נדרש אחד מהיקפי ההרשאות הבאים של OAuth:
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/classroom.rosters.readonly
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
מידע נוסף זמין במדריך ההרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-12-05 (שעון UTC).
[null,null,["עדכון אחרון: 2024-12-05 (שעון UTC)."],[[["This endpoint retrieves a user profile based on the provided user ID."],["The user ID can be a numeric identifier, email address, or \"me\" to indicate the requesting user."],["An empty request body is required, and a successful response returns a UserProfile object."],["Authorization is necessary and requires specific OAuth scopes related to rosters, emails, or photos."],["Potential errors include \"PERMISSION_DENIED\" if access is not granted or the profile doesn't exist."]]],[]]