Method: users.settings.forwardingAddresses.create
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Tworzy adres docelowy. Jeśli wymagana jest weryfikacja własności, do odbiorcy zostanie wysłana wiadomość, a stan weryfikacji zasobu zostanie ustawiony na pending
. W przeciwnym razie zasób zostanie utworzony ze stanem weryfikacji accepted
.
Ta metoda jest dostępna tylko dla klientów kont usługi, którym przekazano uprawnienia w całej domenie.
Żądanie HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
userId |
string
Adres e-mail użytkownika. Wartość specjalna „me” może służyć do wskazywania uwierzytelnionego użytkownika.
|
Treść żądania
Treść żądania zawiera wystąpienie elementu ForwardingAddress
.
Treść odpowiedzi
Jeśli operacja się powiedzie, treść odpowiedzi będzie zawierała nowo utworzoną instancję ForwardingAddress
.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
https://www.googleapis.com/auth/gmail.settings.sharing
Więcej informacji znajdziesz w przewodniku dotyczącym autoryzacji.
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[],[],null,["# Method: users.settings.forwardingAddresses.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\nCreates a forwarding address. If ownership verification is required, a message will be sent to the recipient and the resource's verification status will be set to `pending`; otherwise, the resource will be created with verification status set to `accepted`.\n\nThis method is only available to service account clients that have been delegated domain-wide authority.\n\n### HTTP request\n\n`POST https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/forwardingAddresses`\n\nThe URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.\n\n### Path parameters\n\n| Parameters ||\n|----------|-------------------------------------------------------------------------------------------------------|\n| `userId` | `string` User's email address. The special value \"me\" can be used to indicate the authenticated user. |\n\n### Request body\n\nThe request body contains an instance of [ForwardingAddress](/workspace/gmail/api/reference/rest/v1/users.settings.forwardingAddresses#ForwardingAddress).\n\n### Response body\n\nIf successful, the response body contains a newly created instance of [ForwardingAddress](/workspace/gmail/api/reference/rest/v1/users.settings.forwardingAddresses#ForwardingAddress).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/gmail.settings.sharing`\n\nFor more information, see the [Authorization guide](/workspace/guides/configure-oauth-consent)."]]