Method: spaces.messages.delete
لحذف رسالة على سبيل المثال، راجِع حذف رسالة.
تتوافق مع أنواع المصادقة التالية:
عند استخدام مصادقة التطبيق، لا يمكن للطلبات حذف الرسائل التي أنشأها تطبيق Chat المتصل إلا.
طلب HTTP
DELETE https://chat.googleapis.com/v1/{name=spaces/*/messages/*}
يستخدِم عنوان URL بنية تحويل ترميز gRPC.
مَعلمات المسار
المعلمات |
name |
string
مطلوب. اسم المورد للرسالة التنسيق: spaces/{space}/messages/{message} إذا كنت قد حدّدت معرّفًا مخصّصًا لرسالتك، يمكنك استخدام القيمة من حقل clientAssignedMessageId لـ {message} . لمعرفة التفاصيل، يُرجى الاطّلاع على تسمية رسالة.
|
مَعلمات طلب البحث
المعلمات |
force |
boolean
اختيارية: عند true ، يؤدي حذف رسالة إلى حذف الردود المتسلسلة عليها أيضًا. عندما يكون الخيار false مفعَّلاً، إذا كانت الرسالة تتضمّن ردودًا في سلسلة محادثات، يتعذّر حذفها. لا ينطبق إلا عند المصادقة بصفتك مستخدمًا. لا يؤثّر ذلك في المصادقة كتطبيق Chat.
|
نص الطلب
يجب أن يكون نص الطلب فارغًا.
نص الاستجابة
إذا كانت الاستجابة ناجحة، يكون نص الاستجابة هو عنصر 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 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة 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"]]