Method: spaces.messages.delete
Menghapus pesan. Untuk contoh, lihat Menghapus pesan.
Mendukung jenis autentikasi berikut:
Saat menggunakan autentikasi aplikasi, permintaan hanya dapat menghapus pesan yang dibuat oleh aplikasi Chat yang melakukan panggilan.
Permintaan HTTP
DELETE https://chat.googleapis.com/v1/{name=spaces/*/messages/*}
URL menggunakan sintaksis gRPC Transcoding.
Parameter jalur
Parameter |
name |
string
Wajib. Nama resource pesan. Format: spaces/{space}/messages/{message} Jika telah menetapkan ID kustom untuk pesan, Anda dapat menggunakan nilai dari kolom clientAssignedMessageId untuk {message} . Untuk mengetahui detailnya, lihat Memberi nama pesan.
|
Isi permintaan
Isi permintaan harus kosong.
Isi respons
Jika berhasil, isi respons adalah objek JSON kosong.
Cakupan otorisasi
Memerlukan salah satu cakupan OAuth berikut:
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.import
https://www.googleapis.com/auth/chat.messages
Untuk mengetahui 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 2025-01-22 UTC.
[null,null,["Terakhir diperbarui pada 2025-01-22 UTC."],[[["This method enables you to delete messages and optionally their replies using an HTTP DELETE request."],["It supports both app and user authentication, with app authentication limiting deletion to messages created by the app."],["You can specify whether to force delete threaded replies with the `force` query parameter when using user authentication."],["The request requires specifying the message's resource name in the URL path and an empty request body."],["Authorization is required using one of the specified OAuth scopes."]]],["This document details how to delete a message using the Chat API. The `DELETE` request targets a specific message's resource name in the format `spaces/*/messages/*`. It supports both app and user authentication, with different limitations for each. The request requires a message's name as a path parameter. A `force` query parameter is optional for user authentication to delete threaded replies. The request body is empty, and a successful response returns an empty JSON object. One of three specified OAuth scopes is required.\n"]]