Method: users.insert
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
उपयोगकर्ता बनाता है.
उपयोगकर्ता बनाने के तुरंत बाद, म्यूटेट कॉल कभी-कभी काम नहीं कर सकते. ऐसा इसलिए होता है, क्योंकि हमारे बैकएंड में प्रोपेगेशन में लगने वाले समय की वजह से, उपयोगकर्ता पूरी तरह से नहीं बन पाता. "उपयोगकर्ता बनाने की प्रोसेस पूरी नहीं हुई" मैसेज में गड़बड़ी की जानकारी देखें और पता लगाएं कि क्या यह समस्या है. इस मामले में, कुछ समय बाद कॉल करने से मदद मिल सकती है.
अगर resolveConflictAccount
को true
पर सेट किया गया है, तो 202
रिस्पॉन्स कोड का मतलब है कि कोई ऐसा खाता मौजूद है जो मैनेज नहीं किया जा रहा है और जिसे संगठन में शामिल होने का न्योता भेजा गया था. 409
रिस्पॉन्स कोड का मतलब है कि कोई ऐसा खाता मौजूद है जो आपके चुने गए मैनेज नहीं किए जा रहे उपयोगकर्ता खातों को मैनेज करने के विकल्प के मुताबिक नहीं है. इसलिए, उपयोगकर्ता को नहीं बनाया गया.
एचटीटीपी अनुरोध
POST https://admin.googleapis.com/admin/directory/v1/users
यूआरएल में gRPC ट्रांसकोडिंग सिंटैक्स का इस्तेमाल किया गया है.
क्वेरी पैरामीटर
पैरामीटर |
resolveConflictAccount |
boolean
ज़रूरी नहीं. अगर इसे true पर सेट किया जाता है, तो मैनेज नहीं किए जा रहे उपयोगकर्ता खातों को मैनेज करने के लिए चुना गया विकल्प लागू हो जाएगा. डिफ़ॉल्ट: false
|
अनुरोध का मुख्य भाग
अनुरोध के मुख्य भाग में User
का उदाहरण है.
जवाब का मुख्य भाग
कामयाब रहने पर, जवाब के मुख्य हिस्से में User
का नया इंस्टेंस शामिल किया जाता है.
अनुमति के दायरे
नीचे दिए गए OAuth के लिंक की ज़रूरत हाेती है:
https://www.googleapis.com/auth/admin.directory.user
ज़्यादा जानकारी के लिए, अनुमति से जुड़ी गाइड देखें.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को 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: users.insert\n\nCreates a user.\n\nMutate calls immediately following user creation might sometimes fail as the user isn't fully created due to propagation delay in our backends. Check the error details for the \"User creation is not complete\" message to see if this is the case. Retrying the calls after some time can help in this case.\n\nIf `resolveConflictAccount` is set to `true`, a `202` response code means that a conflicting unmanaged account exists and was invited to join the organization. A `409` response code means that a conflicting account exists so the user wasn't created based on the [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) option selected.\n\n### HTTP request\n\n`POST https://admin.googleapis.com/admin/directory/v1/users`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Query parameters\n\n| Parameters ||\n|--------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `resolveConflictAccount` | `boolean` Optional. If set to `true`, the option selected for [handling unmanaged user accounts](https://support.google.com/a/answer/11112794) will apply. Default: `false` |\n\n### Request body\n\nThe request body contains an instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [User](/workspace/admin/directory/reference/rest/v1/users#User).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/admin.directory.user`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]