Method: users.settings.forwardingAddresses.create
Tworzy adres do przekazywania dalej. 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 przyznano 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. Specjalna wartość „ja” może służyć do wskazania uwierzytelnionego użytkownika.
|
Treść żądania
Treść żądania zawiera wystąpienie elementu ForwardingAddress
.
Treść odpowiedzi
Jeśli operacja się uda, 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 po 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: 2024-09-05 UTC.
[null,null,["Ostatnia aktualizacja: 2024-09-05 UTC."],[[["Creates a forwarding address for a Gmail user, requiring domain-wide delegated authority for service accounts."],["If ownership verification is needed, a verification message is sent, setting the status to `pending`; otherwise, the status is set to `accepted`."],["Uses the `POST` method and provides details on the request body, response body, path parameters, and required authorization scope."],["This feature utilizes the `https://www.googleapis.com/auth/gmail.settings.sharing` OAuth scope for access and management of forwarding addresses."]]],["A forwarding address is created using a `POST` request to the specified URL, including the user's email in the `userId` path parameter. The request body must contain a `ForwardingAddress` instance. Ownership verification might be initiated, setting the status to `pending`. The operation is limited to service accounts with domain-wide authority, requiring the `gmail.settings.sharing` OAuth scope. Successful creation returns a new `ForwardingAddress` instance in the response body.\n"]]