Access Errors
存取錯誤
如果使用者不符合存取權條件,所有 Classroom API 方法可能會傳回 PERMISSION_DENIED (HTTP 403) 錯誤。錯誤訊息中會附上錯誤訊息,協助您找出原因,並引導使用者採取適當行動。
以下各節說明 API 錯誤訊息。
無法直接新增使用者
CannotDirectAddUser
表示使用者無法直接加入課程。網域管理員嘗試將使用者加入課程時,只要他們沒有電子郵件地址或不屬於網域,就會發生這個程式碼。
可能的動作:請說明失敗的原因,並建議網域管理員檢查使用者帳戶是否確實存在,且位於課程管理員的網域內。
Classroom 已停用
ClassroomDisabled
表示要求的使用者沒有 Classroom 存取權。
可能採取的行動:請使用者參閱啟用 Classroom 存取權的操作說明。使用者也可能使用錯誤的帳戶,因此您也可以提供使用多個帳戶的連結,方便使用者選取正確的帳戶。
專案權限遭拒
ProjectPermissionDenied
表示要求嘗試修改與其他 Play 專案專案相關聯的資源。
可採取的動作:表示應用程式無法發出所需要求。只能透過建立資源的 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":"其他"
}]