Method: spaces.messages.delete
یک پیام را حذف می کند. برای مثال، حذف یک پیام را ببینید.
از انواع احراز هویت زیر پشتیبانی می کند:
هنگام استفاده از احراز هویت برنامه، درخواستها فقط میتوانند پیامهای ایجاد شده توسط برنامه چت را حذف کنند.
درخواست HTTP
DELETE https://chat.googleapis.com/v1/{name=spaces/*/messages/*}
URL از دستور GRPC Transcoding استفاده می کند.
پارامترهای مسیر
پارامترها |
---|
name | string مورد نیاز. نام منبع پیام قالب: spaces/{space}/messages/{message} اگر یک شناسه سفارشی برای پیام خود تنظیم کردهاید، میتوانید از مقدار فیلد clientAssignedMessageId برای {message} استفاده کنید. برای جزئیات، به نام پیام مراجعه کنید. |
درخواست بدن
بدنه درخواست باید خالی باشد.
بدن پاسخگو
در صورت موفقیت آمیز بودن، بدنه پاسخ یک شی JSON خالی است.
محدوده مجوز
به یکی از حوزه های OAuth زیر نیاز دارد:
-
https://www.googleapis.com/auth/chat.bot
-
https://www.googleapis.com/auth/chat.import
-
https://www.googleapis.com/auth/chat.messages
برای اطلاعات بیشتر، به راهنمای مجوز مراجعه کنید.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-22 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-22 بهوقت ساعت هماهنگ جهانی."],[[["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"]]