एडमिन SDK ग्रुप की सेटिंग की सेवा
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Admin SDK Groups Settings सेवा की मदद से, Apps Script में Admin SDK के Groups Settings API का इस्तेमाल किया जा सकता है. इस एपीआई की मदद से, Google Workspace डोमेन के एडमिन (इसमें रीसेलर भी शामिल हैं) अपने Google Workspace खाते में मौजूद ग्रुप की सेटिंग मैनेज कर सकते हैं.
रेफ़रंस
इस सेवा के बारे में ज़्यादा जानने के लिए, Admin SDK Groups Settings API का रेफ़रंस दस्तावेज़ देखें. Apps Script की सभी ऐडवांस सेवाओं की तरह, Admin SDK Groups Settings सेवा भी सार्वजनिक एपीआई के ऑब्जेक्ट, तरीकों, और पैरामीटर का इस्तेमाल करती है. ज़्यादा जानकारी के लिए, तरीके के सिग्नेचर कैसे तय किए जाते हैं लेख पढ़ें.
समस्याओं की शिकायत करने और अन्य सहायता पाने के लिए, Admin SDK Groups Settings की सहायता गाइड देखें.
नमूना कोड
नीचे दिए गए सैंपल कोड में, एपीआई के वर्शन 1 का इस्तेमाल किया गया है.
किसी ग्रुप की सेटिंग पाना
यह सैंपल, ग्रुप की सेटिंग को हासिल करता है और उन्हें कंसोल में लॉग करता है.
किसी ग्रुप की सेटिंग अपडेट करना
इस सैंपल में दिखाया गया है कि किसी ग्रुप की सेटिंग कैसे बदली जा सकती हैं. यहां जानकारी में बदलाव किया गया है. हालांकि, इसी तरह से कई अन्य सेटिंग में भी बदलाव किया जा सकता है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2025-08-31 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eThe Admin SDK Groups Settings service enables Google Workspace administrators to manage group settings within their accounts using Apps Script and the Groups Settings API.\u003c/p\u003e\n"],["\u003cp\u003eThis is an advanced service that requires enabling before use and mirrors the functionality of the public API.\u003c/p\u003e\n"],["\u003cp\u003eComprehensive reference documentation, support resources, and sample code are available to guide developers in using this service effectively, including examples for retrieving and updating group settings.\u003c/p\u003e\n"]]],[],null,["# Admin SDK Groups Settings Service\n\nThe Admin SDK Groups Settings service allows you to use the Admin SDK's\n[Groups Settings API](/admin-sdk/groups-settings) in Apps Script. This API\ngives administrators of Google Workspace domains\n(including resellers) the ability to manage the group settings for groups in\ntheir Google Workspace account.\n| **Note:** This is an advanced service that must be [enabled before use](/apps-script/guides/services/advanced).\n\nReference\n---------\n\nFor detailed information on this service, see the\n[reference documentation](/admin-sdk/groups-settings/v1/reference) for the\nAdmin SDK Groups Settings API. Like all advanced services in Apps Script, the\nAdmin SDK Groups Settings service uses the same objects, methods, and parameters\nas the public API. For more information, see [How method signatures are determined](/apps-script/guides/services/advanced#how_method_signatures_are_determined).\n\nTo report issues and find other support, see the\n[Admin SDK Groups Settings support guide](/admin-sdk/groups-settings/support).\n\nSample code\n-----------\n\nThe sample code below uses [version 1](/admin-sdk/groups-settings/v1/reference)\nof the API.\n\n### Get a group's settings\n\nThis sample gets a group's settings and logs them to the console. \nadvanced/adminSDK.gs \n[View on GitHub](https://github.com/googleworkspace/apps-script-samples/blob/main/advanced/adminSDK.gs) \n\n```javascript\n/**\n * Gets a group's settings and logs them to the console.\n */\nfunction getGroupSettings() {\n // TODO (developer) - Replace groupId value with yours\n const groupId = 'exampleGroup@example.com';\n try {\n const group = AdminGroupsSettings.Groups.get(groupId);\n console.log(JSON.stringify(group, null, 2));\n } catch (err) {\n // TODO (developer)- Handle exception from the API\n console.log('Failed with error %s', err.message);\n }\n}\n```\n\n### Update a group's settings\n\nThis sample shows how a group's settings can be changed. Here, the description\nis modified, but various other settings can be changed in the same way.\n\n\nadvanced/adminSDK.gs \n[View on GitHub](https://github.com/googleworkspace/apps-script-samples/blob/main/advanced/adminSDK.gs) \n\n```javascript\n/**\n * Updates group's settings. Here, the description is modified, but various\n * other settings can be changed in the same way.\n * @see https://developers.google.com/admin-sdk/groups-settings/v1/reference/groups/patch\n */\nfunction updateGroupSettings() {\n const groupId = 'exampleGroup@example.com';\n try {\n const group = AdminGroupsSettings.newGroups();\n group.description = 'Newly changed group description';\n AdminGroupsSettings.Groups.patch(group, groupId);\n } catch (err) {\n // TODO (developer)- Handle exception from the API\n console.log('Failed with error %s', err.message);\n }\n}\n```\n\n\u003cbr /\u003e"]]