PERMISSION_DENIED if the requesting user is not permitted to access the requested course, create course work material in the requested course, share a Drive attachment, or for access errors.
INVALID_ARGUMENT if the request is malformed or if more than 20
materials are provided.
NOT_FOUND if the requested course does not exist.
FAILED_PRECONDITION for the following request error:
AttachmentNotVisible
HTTP request
POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWorkMaterials
[[["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 course work material using the `POST` method and requires a request body containing an instance of `CourseWorkMaterial`."],["Utilizes the `courseId` path parameter to identify the target course, accepting either Classroom-assigned identifiers or aliases."],["Returns a newly created `CourseWorkMaterial` instance upon successful execution."],["Requires authorization with the `https://www.googleapis.com/auth/classroom.courseworkmaterials` scope."],["May return errors like `PERMISSION_DENIED`, `INVALID_ARGUMENT`, `NOT_FOUND`, or `FAILED_PRECONDITION` based on specific conditions."]]],[]]