संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
उपयोगकर्ता का उपनाम बनाना
उपयोगकर्ता का उपनाम, एक ऐसा दूसरा ईमेल पता होता है जो उसी मेलबॉक्स का इस्तेमाल करता है जिसका इस्तेमाल उपयोगकर्ता के मुख्य ईमेल पते के लिए किया जाता है. उपयोगकर्ता के उपनाम को, उपयोगकर्ता के मुख्य ईमेल पते के डोमेन के बजाय, किसी दूसरे खाते के डोमेन से जोड़ा जा सकता है. उपयोगकर्ता को 24 घंटे के अंदर (आम तौर पर इससे पहले) इस पते पर ईमेल मिलना शुरू हो जाता है. एपीआई के मुताबिक, उपयोगकर्ता का दूसरा नाम बनाने से पहले, डोमेन के मालिकाना हक की पुष्टि करनी होगी.
उपयोगकर्ता का दूसरा नाम बनाने के लिए, यहां दिए गए POST अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें. userKey, उपयोगकर्ता का मुख्य ईमेल पता, उपयोगकर्ता id या उपयोगकर्ता के किसी भी उपनाम का ईमेल पता हो सकता है. अनुरोध और रिस्पॉन्स प्रॉपर्टी के लिए, एपीआई का रेफ़रंस देखें:
POST https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases
JSON अनुरोध
यहां दिया गया JSON अनुरोध, उपयोगकर्ता का उपनाम बनाने के लिए अनुरोध का सैंपल दिखाता है. उपयोगकर्ता का नाम liz@example.com है और उसका उपनाम chica@example.com है:
POST https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases
अनुरोध के मुख्य हिस्से में, बदली गई उपनाम की जानकारी है:
{"alias":"chica@example.com"}
अनुरोध पूरा होने पर, एचटीटीपी 201 स्टेटस कोड दिखता है. स्टेटस कोड के साथ-साथ, रिस्पॉन्स में उपयोगकर्ता के नए उपनाम की प्रॉपर्टी भी दिखती हैं.
किसी उपयोगकर्ता के सभी उपनामों को वापस पाना
किसी उपयोगकर्ता के सभी डोमेन में मौजूद सभी उपनामों को वापस पाने के लिए, नीचे दिए गए GET अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें. userKey, उपयोगकर्ता का मुख्य ईमेल पता, उपयोगकर्ता id या उपयोगकर्ता के किसी भी उपनाम का ईमेल पता हो सकता है. अनुरोध और रिस्पॉन्स प्रॉपर्टी के लिए, एपीआई का रेफ़रंस देखें:
GET https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases
उदाहरण के लिए, यह अनुरोध यूआरआई, liz@example.com यूज़रकी के लिए सभी उपनाम दिखाता है:
GET https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases
उपयोगकर्ता के सभी उपनाम, वर्णमाला के क्रम में दिखाए जाते हैं. 'सभी उपनामों को वापस पाएं' रिस्पॉन्स के लिए इस्तेमाल की गई maxResults क्वेरी स्ट्रिंग या पेजेशन जैसा कोई पेज साइज़ नहीं है.
JSON का रिस्पॉन्स
अनुरोध पूरा होने पर, एचटीटीपी 200 स्टेटस कोड दिखता है. स्टेटस कोड के साथ-साथ, जवाब में उपयोगकर्ता के उपनाम, वर्णमाला के क्रम में दिखते हैं. ये अन्य डोमेन नेम, खाते में मौजूद प्राइमरी डोमेन और अन्य डोमेन हैं:
{"kind":"directory#user#aliases","aliases":[ { "kind": "directory#user#alias", "id": "the unique user id", "primary_email": "liz@example.com", "alias": "chica@example.com" }, { "kind": "directory#user#alias", "id": "the unique user id", "primary_email": "liz@example.com", "alias": "support@example.com" }, { "kind": "directory#user#alias", "id": "the unique user id", "primary_email": "liz@example.com", "alias": "help@hr.example.com" }, { "kind": "directory#user#alias", "id": "the unique user id", "primary_email": "liz@example.com", "alias": "tickets@jumboinc.com" }]}
किसी उपयोगकर्ता का उपनाम मिटाना
उपयोगकर्ता का कोई दूसरा नाम मिटाने के लिए, यहां दिए गए DELETE अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें. उपनाम हटाने में 24 घंटे लग सकते हैं. userKey, उपयोगकर्ता का मुख्य ईमेल पता, उपयोगकर्ता id या उपयोगकर्ता के किसी भी उपनाम का ईमेल पता हो सकता है. aliasId, उपनाम का वह ईमेल पता है जिसे मिटाया जा रहा है. अनुरोध और रिस्पॉन्स प्रॉपर्टी के लिए, एपीआई का रेफ़रंस देखें.
[null,null,["आखिरी बार 2025-08-29 (UTC) को अपडेट किया गया."],[],[],null,["# Directory API: User Aliases\n\nCreate a user alias\n-------------------\n\nA user's alias is an alternate email address that uses the same mailbox used by the user's\nprimary email address. A user alias can be associated with a different account domain than that\ndomain used by the user's primary email address. Within 24 hours (often sooner), the user begins\nreceiving email sent to this address. The API requires that the\n[domain's ownership is confirmed](https://support.google.com/a/bin/answer.py?lev=index&cbid=sm2s8vsdlrxw&answer=60216&src=cb)\nbefore you can create the user alias.\n| **Note:** The maximum number of aliases per user is 30.\n\nTo create a user alias, use the following `POST` request and include the authorization described in [Authorize requests](/workspace/admin/directory/v1/guides/authorizing). The `userKey` can be the user's primary email address, the user `id`, or any of the user aliases' emails. For the request and response properties, see the [API Reference](/workspace/admin/directory/reference/rest/v1/users.aliases/insert): \n\n```\nPOST https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases\n```\n\n### JSON request\n\nThe following JSON request shows a sample request to create a user's alias. The user is liz@example.com and the alias is chica@example.com: \n\n```\nPOST https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases\n```\nThe request body has the new alias information: \n\n```transact-sql\n{ \n \"alias\": \"chica@example.com\"\n}\n```\n\nA successful response returns an [HTTP 201 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes). Along with the status code, the response returns the properties for the new user alias.\n\nRetrieve all of a user's aliases\n--------------------------------\n\nTo retrieve all of a user's aliases across all domains, use the following `GET` request and include the authorization described in [Authorize requests](/workspace/admin/directory/v1/guides/authorizing). The `userKey` can be the user's primary email address, the user `id`, or any of the user aliases' emails. For the request and response properties, see the [API Reference](/workspace/admin/directory/reference/rest/v1/users.aliases/list): \n\n```\nGET https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases\n```\nFor example, this request URI returns all aliases for the userKey, liz@example.com: \n\n```\nGET https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases\n```\n\nAll user aliases are returned in alphabetical order. There is no page size such as the `maxResults` query string or pagination used for the 'Retrieve all aliases' response.\n| **Note:** These are editable user email alias in the account's primary domain or subdomains. For user aliases outside of the account, see the [user's nonEditableAliases property](/workspace/admin/directory/v1/reference/users#nonEditableAliases).\n\n### JSON response\n\nA successful response returns an [HTTP 200 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes). Along with the status code, the response returns the user's aliases in alphabetical order. These alias domains are the primary domain and other multiple domains in the account: \n\n```transact-sql\n{\n\"kind\": \"directory#user#aliases\",\n\"aliases\": [\n {\n \"kind\": \"directory#user#alias\",\n \"id\": \"the unique user id\",\n \"primary_email\": \"liz@example.com\",\n \"alias\": \"chica@example.com\"\n },\n {\n \"kind\": \"directory#user#alias\",\n \"id\": \"the unique user id\",\n \"primary_email\": \"liz@example.com\",\n \"alias\": \"support@example.com\"\n },\n {\n \"kind\": \"directory#user#alias\",\n \"id\": \"the unique user id\",\n \"primary_email\": \"liz@example.com\",\n \"alias\": \"help@hr.example.com\"\n },\n {\n \"kind\": \"directory#user#alias\",\n \"id\": \"the unique user id\",\n \"primary_email\": \"liz@example.com\",\n \"alias\": \"tickets@jumboinc.com\"\n }\n]\n}\n```\n\nDelete a user's alias\n---------------------\n\nTo delete a user alias, use the following `DELETE` request and include the\nauthorization described in\n[Authorize requests](/workspace/admin/directory/v1/guides/authorizing). It can take up\nto 24 hours for the alias to be removed. The\n`userKey` can be the user's primary email address, the user `id`, or any of\nthe user aliases' emails. And the `aliasId` is the alias' email address that is being\ndeleted. For the request and response properties, see the\n[API reference](/workspace/admin/directory/reference/rest/v1/users.aliases/delete). \n\n```\nDELETE https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases/aliasId\n```\nFor example, this `DELETE` request deletes the chica@example.com alias for the userKey, liz@example.com: \n\n```\nDELETE https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases/chica@example.com\n```\n\nA successful response returns an [HTTP 200 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes).\n| **Note:** Deleting a user's alias, does not delete the user. A deleted user alias can be used again as another user's alias immediately."]]