Access Errors
访问方面的问题
如果最终用户不符合访问前提条件,则所有 Classroom API 方法都可能返回 PERMISSION_DENIED (HTTP 403) 错误。错误消息附有错误消息,可帮助您找出原因并引导用户采取适当措施。
以下部分介绍了 API 错误消息。
无法直接添加用户
CannotDirectAddUser
表示用户无法直接加入课程。当网域管理员尝试向课程添加用户但该用户没有电子邮件地址或不属于该网域时,就会发生此代码。
可能的操作:说明失败的原因,并建议网域管理员检查用户帐号是否存在以及是否在课程管理员的网域中。
已停用 Google 课堂
ClassroomDisabled
表示发出请求的用户无权访问“课堂”。
可能的操作:引导用户参阅有关如何启用 Google 课堂的访问权限的说明。用户可能使用的是错误的帐号,因此您可能还会提供使用多个帐号的链接,以便用户选择正确的帐号。
项目权限遭拒
ProjectPermissionDenied
表示请求尝试修改与其他 Developer Console 项目关联的资源。
可能的操作:表示您的应用无法发出所需的请求。只能由创建资源的 OAuth 客户端 ID 的开发者控制台项目获取。
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-08-17 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"没有我需要的信息"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"太复杂/步骤太多"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"内容需要更新"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"示例/代码问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]