Method: users.messages.delete
Natychmiast i trwale usuwa określoną wiadomość. Tej operacji nie można cofnąć. Zamiast tego wol messages.trash
.
Żądanie HTTP
DELETE https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{id}
Adres URL używa składni transkodowania gRPC.
Parametry ścieżki
Parametry |
userId |
string
Adres e-mail użytkownika. Specjalna wartość me może służyć do wskazania uwierzytelnionego użytkownika.
|
id |
string
Identyfikator wiadomości do usunięcia.
|
Treść żądania
Treść żądania musi być pusta.
Treść odpowiedzi
Jeśli operacja się uda, treść odpowiedzi będzie pusta.
Zakresy autoryzacji
Wymaga następującego zakresu OAuth:
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."],[[["Permanently deletes a specified message, an irreversible action."],["Requires user ID and message ID to execute."],["Uses an empty request body and returns an empty response body upon success."],["Needs authorization with the `https://mail.google.com/` scope."]]],["The core actions are to permanently delete a specified message using a `DELETE` HTTP request. The request URL structure requires `userId` (user's email, \"me\" for authenticated user) and `id` (message ID) as path parameters. The request body must be empty. A successful deletion returns an empty response body. The process needs authorization via the `https://mail.google.com/` OAuth scope. It is stated that the `messages.trash` is a preferred method than deleting.\n"]]