Method: courses.teachers.create
建立課程的老師。
網域管理員有權將網域中的使用者直接新增為網域中的課程。非管理員使用者應改為傳送 Invitation
。
這個方法會傳回下列錯誤代碼:
- 如果要求的使用者不允許在這個課程中建立老師,或是發生存取錯誤,則為
PERMISSION_DENIED
。
- 如果要求的課程 ID 不存在,會傳回
NOT_FOUND
。
- 如果要求的使用者帳戶遭到停用,則為
FAILED_PRECONDITION
,且發生下列要求錯誤:
- 課程的成員人數達到上限
- 課程不可修改
- 已達 TeachTeacherLimitContact
- 已達使用者群組成員資格上限
- 閒置課程擁有者
- 如果使用者是課程中的老師或學生,則為
ALREADY_EXISTS
。
HTTP 要求
POST https://classroom.googleapis.com/v1/courses/{courseId}/teachers
這個網址使用 gRPC 轉碼語法。
路徑參數
參數 |
courseId |
string
課程的識別碼。這組 ID 可以是 Classroom 指派的 ID 或 alias 。
|
回應主體
如果成功,回應主體會包含新建立的 Teacher
例項。
授權範圍
需要下列其中一種 OAuth 範圍:
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
詳情請參閱 OAuth 2.0 總覽。
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 2022-03-21 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":"其他"
}]