Method: users.threads.trash
Memindahkan rangkaian pesan yang ditentukan ke sampah. Pesan apa pun yang menjadi bagian dari rangkaian pesan juga akan dipindahkan ke sampah.
Permintaan HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/trash
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
userId |
string
Alamat email pengguna. Nilai khusus me dapat digunakan untuk menunjukkan pengguna yang diautentikasi.
|
id |
string
ID rangkaian pesan ke Sampah.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons akan berisi instance Thread
.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://mail.google.com/
https://www.googleapis.com/auth/gmail.modify
Untuk informasi selengkapnya, lihat Panduan otorisasi.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-09-05 UTC.
[null,null,["Terakhir diperbarui pada 2024-09-05 UTC."],[[["Moves a specified thread and its associated messages to the trash."],["Requires the user's email address (`userId`) and the thread ID (`id`) as path parameters."],["Uses an empty request body and returns a `Thread` object upon successful completion."],["Needs authorization with either `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.modify` scope."]]],["This document outlines the process for moving a Gmail thread to the trash via an API. The `POST` request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/threads/{id}/trash` requires two path parameters: `userId` (user's email, or \"me\") and `id` (thread ID). The request body must be empty. Upon success, the response contains thread details. Authorization requires either `https://mail.google.com/` or `https://www.googleapis.com/auth/gmail.modify` OAuth scope.\n"]]