Google Classroom 外掛程式現已全面開放開發人員使用!詳情請參閱
外掛程式說明文件。
REST Resource: userProfiles
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
資源:UserProfile
JSON 表示法 |
{
"id": string,
"name": {
object (Name )
},
"emailAddress": string,
"photoUrl": string,
"permissions": [
{
object (GlobalPermission )
}
],
"verifiedTeacher": boolean
} |
欄位 |
id |
string
使用者的 ID。 唯讀。
|
name |
object (Name )
使用者名稱。 唯讀。
|
emailAddress |
string
使用者的電子郵件地址。 必須要求 https://www.googleapis.com/auth/classroom.profile.emails 範圍,才能在回應主體中填入這個欄位。 唯讀。
|
photoUrl |
string
使用者個人資料相片的網址。 必須要求 https://www.googleapis.com/auth/classroom.profile.photos 範圍,才能在回應主體中填入這個欄位。 唯讀。
|
permissions[] |
object (GlobalPermission )
使用者的全域權限。 唯讀。
|
verifiedTeacher |
boolean
代表 Google Workspace for Education 使用者的網域管理員是否明確驗證他們為老師。如果使用者不是 Google Workspace for Education 網域的會員,這個欄位一律會設為 false。 唯讀
|
名稱
JSON 表示法 |
{
"givenName": string,
"familyName": string,
"fullName": string
} |
欄位 |
givenName |
string
使用者的名字。 唯讀。
|
familyName |
string
使用者的姓氏。 唯讀。
|
fullName |
string
使用者全名,由姓氏和名字值串連而成。 唯讀。
|
權限
列舉 |
PERMISSION_UNSPECIFIED |
未指定任何權限。系統不會傳回此值,且此值並非有效值。 |
CREATE_COURSE |
使用者可建立課程。 |
方法 |
|
傳回使用者是否可以使用指定的 Classroom 功能。 |
|
傳回使用者個人資料。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-25 (世界標準時間)。
[null,null,["上次更新時間:2025-07-25 (世界標準時間)。"],[],[],null,["# REST Resource: userProfiles\n\n- [Resource: UserProfile](#UserProfile)\n - [JSON representation](#UserProfile.SCHEMA_REPRESENTATION)\n - [Name](#UserProfile.Name)\n - [JSON representation](#UserProfile.Name.SCHEMA_REPRESENTATION)\n - [GlobalPermission](#UserProfile.GlobalPermission)\n - [JSON representation](#UserProfile.GlobalPermission.SCHEMA_REPRESENTATION)\n - [Permission](#UserProfile.Permission)\n- [Methods](#METHODS_SUMMARY)\n\nResource: UserProfile\n---------------------\n\nGlobal information for a user.\n\n| JSON representation |\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"id\": string, \"name\": { object (/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.Name) }, \"emailAddress\": string, \"photoUrl\": string, \"permissions\": [ { object (/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.GlobalPermission) } ], \"verifiedTeacher\": boolean } ``` |\n\n| Fields ||\n|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | `string` Identifier of the user. Read-only. |\n| `name` | `object (`[Name](/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.Name)`)` Name of the user. Read-only. |\n| `emailAddress` | `string` Email address of the user. Must request `https://www.googleapis.com/auth/classroom.profile.emails` scope for this field to be populated in a response body. Read-only. |\n| `photoUrl` | `string` URL of user's profile photo. Must request `https://www.googleapis.com/auth/classroom.profile.photos` scope for this field to be populated in a response body. Read-only. |\n| `permissions[]` | `object (`[GlobalPermission](/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.GlobalPermission)`)` Global permissions of the user. Read-only. |\n| `verifiedTeacher` | `boolean` Represents whether a Google Workspace for Education user's domain administrator has explicitly verified them as being a teacher. This field is always false if the user is not a member of a Google Workspace for Education domain. Read-only |\n\n### Name\n\nDetails of the user's name.\n\n| JSON representation |\n|---------------------------------------------------------------------------|\n| ``` { \"givenName\": string, \"familyName\": string, \"fullName\": string } ``` |\n\n| Fields ||\n|--------------|--------------------------------------------------------------------------------------------------|\n| `givenName` | `string` The user's first name. Read-only. |\n| `familyName` | `string` The user's last name. Read-only. |\n| `fullName` | `string` The user's full name formed by concatenating the first and last name values. Read-only. |\n\n### GlobalPermission\n\nGlobal user permission description.\n\n| JSON representation |\n|-------------------------------------------------------------------------------------------------------------|\n| ``` { \"permission\": enum (/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.Permission) } ``` |\n\n| Fields ||\n|--------------|-----------------------------------------------------------------------------------------------------------------------|\n| `permission` | `enum (`[Permission](/workspace/classroom/reference/rest/v1/userProfiles#UserProfile.Permission)`)` Permission value. |\n\n### Permission\n\nPossible permissions that a user may have.\n\n| Enums ||\n|--------------------------|----------------------------------------------------------------------------|\n| `PERMISSION_UNSPECIFIED` | No permission is specified. This is not returned and is not a valid value. |\n| `CREATE_COURSE` | User is permitted to create a course. |\n\n| Methods ------- ||\n|----------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### [checkUserCapability](/workspace/classroom/reference/rest/v1/userProfiles/checkUserCapability) | | **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview), which grants early access to certain features. This feature is available in [V1_20240930_PREVIEW](https://developers.google.com/workspace/classroom/reference/rest/v1/PreviewVersion) and later. See [Access Preview APIs](https://developers.google.com/workspace/classroom/reference/preview) to learn more. Returns whether a user may use the specified Classroom capability. |\n| ### [get](/workspace/classroom/reference/rest/v1/userProfiles/get) | Returns a user profile. |"]]