Method: users.messages.trash
HTTP リクエスト
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{id}/trash
この URL は gRPC Transcoding 構文を使用します。
パスパラメータ
パラメータ |
userId |
string
ユーザーのメールアドレス。特別な値 me を使用すると、認証済みユーザーを示すことができます。
|
id |
string
ゴミ箱に移動するメッセージの ID。
|
リクエスト本文
リクエストの本文は空にする必要があります。
レスポンスの本文
成功した場合、レスポンスの本文には Message
のインスタンスが含まれます。
認可スコープ
次の OAuth スコープのいずれかが必要です。
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
詳細については、承認ガイドをご覧ください。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2024-09-05 UTC。
[null,null,["最終更新日 2024-09-05 UTC。"],[[["Moves the specified message to the trash using the Gmail API."],["Requires the user's email address and the message ID as path parameters."],["An empty request body is necessary, and a successful response returns the message details."],["Needs authorization with specific OAuth scopes for modifying Gmail access."]]],["This document outlines the process for moving a message to the trash using the Gmail API. It requires a `POST` request to a specific URL: `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/{id}/trash`. The `userId` and `id` of the message are specified in the path. The request body must be empty. Upon success, the API returns a `Message` instance. Authorization requires either `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.modify` OAuth scopes.\n"]]