Google 课堂插件现已面向开发者正式推出!如需了解详情,请参阅
插件文档。
REST Resource: userProfiles
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
资源:UserProfile
JSON 表示法 |
{
"id": string,
"name": {
object (Name )
},
"emailAddress": string,
"photoUrl": string,
"permissions": [
{
object (GlobalPermission )
}
],
"verifiedTeacher": boolean
} |
字段 |
id |
string
用户的标识符。 只读。
|
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 教育版用户的网域管理员是否已明确验证其教师身份。如果用户不是 Google Workspace 教育版网域的成员,此字段始终为 false。 只读
|
名称
JSON 表示法 |
{
"givenName": string,
"familyName": string,
"fullName": string
} |
字段 |
givenName |
string
用户的名字。 只读。
|
familyName |
string
用户的姓氏。 只读。
|
fullName |
string
通过串联名字和姓氏值组成的用户全名。 只读。
|
权限
枚举 |
PERMISSION_UNSPECIFIED |
未指定任何权限。系统不会返回此值,并且此值无效。 |
CREATE_COURSE |
允许用户创建课程。 |
方法 |
|
返回用户能否使用指定的 Google 课堂功能。 |
|
返回用户个人资料。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):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. |"]]