تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
إنشاء عنوان بديل للمستخدم
العنوان البديل للمستخدم هو عنوان بريد إلكتروني بديل يستخدم البريد الوارد نفسه المستخدَم في عنوان البريد الإلكتروني
الرئيسي للمستخدم. يمكن ربط الاسم المعرِّف للمستخدم بنطاق حساب مختلف عن
النطاق المستخدَم في عنوان البريد الإلكتروني الأساسي للمستخدم. في غضون 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"}
تعرِض الاستجابة الناجحة رمز حالة HTTP 201. وإلى جانب رمز الحالة، تعرض الاستجابة سمات الاسم المعرِّف للمستخدم الجديد.
استرداد جميع العناوين البديلة لمستخدم
لاسترداد جميع العناوين البديلة للمستخدم في جميع النطاقات، استخدِم طلب GET التالي وأضِف التفويض الموضّح في طلبات التفويض. يمكن أن يكون userKey هو عنوان البريد الإلكتروني الرئيسي للمستخدم أو المستخدم id أو أي من عناوين البريد الإلكتروني البديلة للمستخدم. للاطّلاع على سمات الطلب والاستجابة، راجِع مرجع واجهة برمجة التطبيقات:
GET https://admin.googleapis.com/admin/directory/v1/users/userKey/aliases
على سبيل المثال، يعرض عنوان URL للطلب هذا جميع الأسماء البديلة لمفتاح المستخدم liz@example.com:
GET https://admin.googleapis.com/admin/directory/v1/users/liz@example.com/aliases
يتم عرض جميع الأسماء البديلة للمستخدمين بترتيب أبجدي. لا يتوفّر حجم صفحة، مثل سلسلة طلب البحث maxResults أو تقسيم الصفحات المستخدَم في استجابة "استرداد كل الأسماء البديلة".
استجابة JSON
يعرض الطلب الناجح رمز الحالة HTTP 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 هو عنوان البريد الإلكتروني للعنوان البديل الذي تتم jego Deletion. للاطّلاع على سمات الطلب والاستجابة، اطّلِع على
مرجع واجهة برمجة التطبيقات.
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],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."]]