Google Classroom eklentileri artık geliştiricilerin genel kullanımına sunuldu! Daha fazla bilgi edinmek için lütfen
eklenti belgelerini inceleyin.
Method: courses.create
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Kurs oluşturur.
ownerId
içinde belirtilen kullanıcı, oluşturulan kursun sahibidir ve öğretmen olarak eklenir. Yönetici olmayan bir kullanıcı, yalnızca kendisinin sahibi olduğu bir kurs oluşturabilir. Alan yöneticileri, alanlarındaki herhangi bir kullanıcının sahip olduğu dersler oluşturabilir.
Bu yöntem aşağıdaki hata kodlarını döndürür:
PERMISSION_DENIED
İstekte bulunan kullanıcının kurs oluşturmasına izin verilmiyorsa veya erişim hataları için.
NOT_FOUND
Birincil öğretmen geçerli bir kullanıcı değilse.
- Kurs sahibinin hesabı devre dışı bırakılmışsa veya aşağıdaki istek hataları için
FAILED_PRECONDITION
:
- UserCannotOwnCourse
- UserGroupsMembershipLimitReached
- CourseTitleCannotContainUrl
id
içinde bir takma ad belirtilmişse ve bu takma ad zaten varsa ALREADY_EXISTS
.
HTTP isteği
POST https://classroom.googleapis.com/v1/courses
URL, gRPC Kod Dönüştürme söz dizimini kullanır.
İstek içeriği
İstek metni, Course
öğesinin bir örneğini içerir.
Yanıt gövdesi
Başarılı olursa yanıt metni, Course
öğesinin yeni oluşturulmuş bir örneğini içerir.
Yetkilendirme kapsamları
Aşağıdaki OAuth kapsamını gerektirir:
https://www.googleapis.com/auth/classroom.courses
Daha fazla bilgi için Yetkilendirme kılavuzu'na bakın.
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-08 UTC.
[null,null,["Son güncelleme tarihi: 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)."]]