Method: spaces.messages.delete
מחיקת הודעה. דוגמה לכך מופיעה במאמר מחיקת הודעה.
יש תמיכה בסוגי אימות הבאים:
כשמשתמשים באימות אפליקציה, הבקשות יכולות למחוק רק הודעות שנוצרו על ידי אפליקציית Chat שבה מתבצעת הקריאה.
בקשת HTTP
DELETE https://chat.googleapis.com/v1/{name=spaces/*/messages/*}
כתובת ה-URL משתמשת בתחביר של Transcoding של 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 (שעון UTC).
[null,null,["עדכון אחרון: 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"]]