Method: users.settings.sendAs.get
Pobiera określony alias „wyślij jako”. Jeśli podany adres nie należy do kolekcji, zostanie zwrócony błąd HTTP 404.
Żądanie HTTP
GET https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}
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.
|
sendAsEmail |
string
Alias „wyślij jako” do pobrania.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu SendAs
.
Zakresy autoryzacji
Wymaga jednego z tych zakresów OAuth:
https://www.googleapis.com/auth/gmail.settings.basic
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.readonly
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."],[[["Retrieves a specific send-as alias for a Gmail user using their email address."],["The request requires specifying the user's email address and the send-as alias email in the URL."],["An empty request body is necessary, and a successful response returns the details of the send-as alias."],["Authorization is required with one of the specified OAuth scopes, including access to Gmail settings or general Gmail access."]]],["This outlines retrieving a \"send-as\" alias via a `GET` request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/settings/sendAs/{sendAsEmail}`. The `userId` and `sendAsEmail` are path parameters, where \"me\" can replace the user's email. The request body must be empty. Successful requests return a `SendAs` instance, otherwise, a 404 error will occur if the alias is not found. One of the four listed OAuth scopes is required for authorization.\n"]]