Hiện tại, các nhà phát triển đã có thể sử dụng rộng rãi tiện ích bổ sung của Google Lớp học! Vui lòng xem tài liệu về tiện ích bổ sung để biết thêm thông tin.
PERMISSION_DENIED nếu người dùng yêu cầu không được phép truy cập vào khoá học được yêu cầu, tạo tài liệu bài tập trong khoá học được yêu cầu, chia sẻ tệp đính kèm trên Drive hoặc do lỗi truy cập.
INVALID_ARGUMENT nếu yêu cầu có định dạng không chính xác hoặc nếu có nhiều hơn 20 yêu cầu
được cung cấp.
NOT_FOUND nếu khoá học được yêu cầu không tồn tại.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-07-25 UTC."],[],[],null,["- [HTTP request](#body.HTTP_TEMPLATE)\n- [Path parameters](#body.PATH_PARAMETERS)\n- [Request body](#body.request_body)\n- [Response body](#body.response_body)\n- [Authorization scopes](#body.aspect)\n- [Try it!](#try-it)\n\nCreates a course work material.\n\nThis method returns the following error codes:\n\n- `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](/workspace/classroom/reference/Access.Errors).\n- `INVALID_ARGUMENT` if the request is malformed or if more than 20\n- materials are provided.\n- `NOT_FOUND` if the requested course does not exist.\n- `FAILED_PRECONDITION` for the following [request error](/workspace/classroom/reference/Request.Errors):\n - AttachmentNotVisible\n\nHTTP request\n\n`POST https://classroom.googleapis.com/v1/courses/{courseId}/courseWorkMaterials`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\nPath parameters\n\n| Parameters ||\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `courseId` | `string` Identifier of the course. This identifier can be either the Classroom-assigned identifier or an [alias](/workspace/classroom/reference/rest/v1/courses.aliases#CourseAlias). |\n\nRequest body\n\nThe request body contains an instance of [CourseWorkMaterial](/workspace/classroom/reference/rest/v1/courses.courseWorkMaterials#CourseWorkMaterial).\n\nResponse body\n\nIf successful, the response body contains a newly created instance of [CourseWorkMaterial](/workspace/classroom/reference/rest/v1/courses.courseWorkMaterials#CourseWorkMaterial).\n\nAuthorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.courseworkmaterials`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]