Google Classroom ऐड-ऑन अब आम तौर पर डेवलपर के लिए उपलब्ध हैं! ज़्यादा जानकारी के लिए, कृपया
ऐड-ऑन दस्तावेज़ देखें.
Method: userProfiles.guardianInvitations.create
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
अभिभावक के लिए न्योता बनाता है और उसे ईमेल भेजता है. इसमें अभिभावक से यह पुष्टि करने के लिए कहा जाता है कि वे छात्र या छात्रा के अभिभावक हैं.
न्योता स्वीकार करने के बाद, अभिभावक का state
स्टेटस COMPLETED
में बदल जाएगा. साथ ही, उन्हें अभिभावक के तौर पर सूचनाएं मिलना शुरू हो जाएंगी. ऐक्टिव अभिभावक की जानकारी दिखाने के लिए, एक Guardian
संसाधन भी बनाया जाएगा.
अनुरोध ऑब्जेक्ट में studentId
और invitedEmailAddress
फ़ील्ड सेट होने चाहिए. इन फ़ील्ड को सेट न करने या अनुरोध में कोई दूसरा फ़ील्ड सेट करने पर, गड़बड़ी का मैसेज दिखेगा.
इस तरीके से, गड़बड़ी के ये कोड मिलते हैं:
PERMISSION_DENIED
अगर मौजूदा उपयोगकर्ता के पास अभिभावकों को मैनेज करने की अनुमति नहीं है, अगर जिस अभिभावक की बात हो रही है उसने उस छात्र या छात्रा के लिए पहले ही बहुत ज़्यादा अनुरोध अस्वीकार कर दिए हैं, अगर उस डोमेन के लिए अभिभावकों को अनुमति नहीं दी गई है या ऐक्सेस से जुड़ी अन्य गड़बड़ियों की वजह से.
RESOURCE_EXHAUSTED
अगर छात्र/छात्रा या अभिभावक ने, अभिभावक के खाते को लिंक करने की तय सीमा से ज़्यादा खाते लिंक किए हैं.
INVALID_ARGUMENT
अगर अभिभावक का ईमेल पता मान्य नहीं है (उदाहरण के लिए, अगर वह बहुत लंबा है) या छात्र/छात्रा के दिए गए आईडी का फ़ॉर्मैट नहीं पहचाना जा सकता (यह ईमेल पता नहीं है और न ही यह इस एपीआई का userId
है). यह गड़बड़ी तब भी दिखेगी, जब रीड-ओनली फ़ील्ड सेट किए गए हों या state
फ़ील्ड को PENDING
के अलावा किसी दूसरी वैल्यू पर सेट किया गया हो.
NOT_FOUND
अगर दिया गया स्टूडेंट आईडी मान्य है, लेकिन Classroom में उस छात्र या छात्रा का कोई रिकॉर्ड नहीं है.
ALREADY_EXISTS
अगर छात्र/छात्रा के लिए, अभिभावक को न्योता पहले ही भेजा जा चुका है और दिया गया invitedEmailAddress
मौजूद है या दिया गया invitedEmailAddress
, इस उपयोगकर्ता के लिए किसी मौजूदा Guardian
के Google खाते से मेल खाता है.
एचटीटीपी अनुरोध
POST https://classroom.googleapis.com/v1/userProfiles/{guardianInvitation.studentId}/guardianInvitations
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
पाथ पैरामीटर
पैरामीटर |
guardianInvitation.studentId |
string
छात्र/छात्रा का आईडी (स्टैंडर्ड फ़ॉर्मैट में)
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में GuardianInvitation
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में GuardianInvitation
का नया इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/classroom.guardianlinks.students
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[],[],null,["# Method: userProfiles.guardianInvitations.create\n\n- [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 guardian invitation, and sends an email to the guardian asking them to confirm that they are the student's guardian.\n\nOnce the guardian accepts the invitation, their `state` will change to `COMPLETED` and they will start receiving guardian notifications. A `Guardian` resource will also be created to represent the active guardian.\n\nThe request object must have the `studentId` and `invitedEmailAddress` fields set. Failing to set these fields, or setting any other fields in the request, will result in an error.\n\nThis method returns the following error codes:\n\n- `PERMISSION_DENIED` if the current user does not have permission to manage guardians, if the guardian in question has already rejected too many requests for that student, if guardians are not enabled for the domain in question, or for other [access errors](/workspace/classroom/reference/Access.Errors).\n- `RESOURCE_EXHAUSTED` if the student or guardian has exceeded the guardian link limit.\n- `INVALID_ARGUMENT` if the guardian email address is not valid (for example, if it is too long), or if the format of the student ID provided cannot be recognized (it is not an email address, nor a `userId` from this API). This error will also be returned if read-only fields are set, or if the `state` field is set to to a value other than `PENDING`.\n- `NOT_FOUND` if the student ID provided is a valid student ID, but Classroom has no record of that student.\n- `ALREADY_EXISTS` if there is already a pending guardian invitation for the student and `invitedEmailAddress` provided, or if the provided `invitedEmailAddress` matches the Google account of an existing `Guardian` for this user.\n\n### HTTP request\n\n`POST https://classroom.googleapis.com/v1/userProfiles/{guardianInvitation.studentId}/guardianInvitations`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|--------------------------------|-------------------------------------------------|\n| `guardianInvitation.studentId` | `string` ID of the student (in standard format) |\n\n### Request body\n\nThe request body contains an instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [GuardianInvitation](/workspace/classroom/reference/rest/v1/userProfiles.guardianInvitations#GuardianInvitation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/classroom.guardianlinks.students`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]