Domain administrators are permitted to directly add users within their domain as teachers to courses within their domain. Non-admin users should send an Invitation instead.
This method returns the following error codes:
PERMISSION_DENIED if the requesting user is not permitted to create teachers in this course or for access errors.
NOT_FOUND if the requested course ID does not exist.
FAILED_PRECONDITION if the requested user's account is disabled, for the following request errors:
CourseMemberLimitReached
CourseNotModifiable
CourseTeacherLimitReached
UserGroupsMembershipLimitReached
InactiveCourseOwner
ALREADY_EXISTS if the user is already a teacher or student in the course.
HTTP request
POST https://classroom.googleapis.com/v1/courses/{courseId}/teachers
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-05 UTC."],[[["Creates a teacher for a specified course, allowing domain administrators to directly add users and non-admins to send invitations."],["Returns errors like `PERMISSION_DENIED`, `NOT_FOUND`, `FAILED_PRECONDITION`, and `ALREADY_EXISTS` based on user permissions and course status."],["Requires a `POST` request to the specified URL with the course ID as a path parameter."],["The request body should contain a `Teacher` object and a successful response will return the newly created `Teacher` object."],["Requires specific authorization scopes for access, including `classroom.rosters`, `classroom.profile.emails`, and `classroom.profile.photos`."]]],[]]