The user specified in ownerId is the owner of the created course and added as a teacher. A non-admin requesting user can only create a course with themselves as the owner. Domain admins can create courses owned by any user within their domain.
This method returns the following error codes:
PERMISSION_DENIED if the requesting user is not permitted to create courses or for access errors.
NOT_FOUND if the primary teacher is not a valid user.
FAILED_PRECONDITION if the course owner's account is disabled or for the following request errors:
UserCannotOwnCourse
UserGroupsMembershipLimitReached
ALREADY_EXISTS if an alias was specified in the id and already exists.
[[["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-09-04 UTC."],[[["Creates a course with the specified owner and adds them as a teacher, with domain admins having broader creation privileges."],["Returns the newly created course details upon success but may yield errors related to permissions, user validity, or pre-existing data."],["Utilizes a POST request to `https://classroom.googleapis.com/v1/courses` with the course details provided in the request body."],["Requires the `https://www.googleapis.com/auth/classroom.courses` OAuth scope for authorization."]]],[]]