Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: courses.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
इस कुकी का इस्तेमाल कोर्स बनाने के लिए किया जाता है.
ownerId
में बताया गया उपयोगकर्ता, बनाए गए कोर्स का मालिक है और उसे शिक्षक के तौर पर जोड़ा गया है. एडमिन के अलावा अन्य उपयोगकर्ता, सिर्फ़ ऐसा कोर्स बना सकता है जिसका वह मालिक हो. डोमेन एडमिन, अपने डोमेन के किसी भी उपयोगकर्ता के मालिकाना हक वाले कोर्स बना सकते हैं.
यह तरीका, गड़बड़ी के ये कोड दिखाता है:
PERMISSION_DENIED
अगर अनुरोध करने वाले उपयोगकर्ता को कोर्स बनाने की अनुमति नहीं है या ऐक्सेस से जुड़ी गड़बड़ियां हुई हैं.
NOT_FOUND
अगर मुख्य शिक्षक मान्य उपयोगकर्ता नहीं है.
FAILED_PRECONDITION
अगर कोर्स के मालिक का खाता बंद कर दिया गया है या अनुरोध से जुड़ी इन गड़बड़ियों के लिए:
- UserCannotOwnCourse
- UserGroupsMembershipLimitReached
- CourseTitleCannotContainUrl
ALREADY_EXISTS
अगर id
में कोई उपनाम दिया गया है और वह पहले से मौजूद है.
एचटीटीपी अनुरोध
POST https://classroom.googleapis.com/v1/courses
यह यूआरएल, gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल करता है.
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में Course
का उदाहरण है.
जवाब का मुख्य भाग
अगर एपीआई सही से जुड़ जाता है, तो जवाब के मुख्य हिस्से में Course
का नया इंस्टेंस शामिल किया जाता है.
अनुमति के स्कोप
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.courses
ज़्यादा जानकारी के लिए, अनुमति पाने से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-08 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-08 (UTC) को अपडेट किया गया."],[],[],null,["# Method: courses.create\n\n- [HTTP request](#body.HTTP_TEMPLATE)\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.\n\nThe 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.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the requesting user is not permitted to create courses or for [access errors](/workspace/classroom/reference/Access.Errors).\n- `NOT_FOUND` if the primary teacher is not a valid user.\n- `FAILED_PRECONDITION` if the course owner's account is disabled or for the following [request errors](/workspace/classroom/reference/Request.Errors):\n - UserCannotOwnCourse\n - UserGroupsMembershipLimitReached\n - CourseTitleCannotContainUrl\n- `ALREADY_EXISTS` if an alias was specified in the `id` and already exists.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/courses`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Request body\n\nThe request body contains an instance of [Course](/workspace/classroom/reference/rest/v1/courses#Course).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [Course](/workspace/classroom/reference/rest/v1/courses#Course).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.courses`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]