Method: users.messages.batchDelete
מחיקת הודעות רבות לפי מזהה ההודעה. לא מבטיח שהודעות לא נמחקו כבר או אפילו לא היו קיימות בכלל.
בקשת HTTP
POST https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchDelete
בכתובת ה-URL נעשה שימוש בתחביר המרת קידוד של gRPC.
פרמטרים של נתיב
פרמטרים |
userId |
string
כתובת האימייל של המשתמש. אפשר להשתמש בערך המיוחד me כדי לציין את המשתמש המאומת.
|
גוף הבקשה
גוף הבקשה מכיל נתונים במבנה הבא:
ייצוג JSON |
{
"ids": [
string
]
} |
שדות |
ids[] |
string
המזהים של ההודעות שאתם רוצים למחוק.
|
גוף התשובה
אם הביצוע יהיה תקין, גוף התגובה יהיה ריק.
היקפי ההרשאות
נדרש היקף ההרשאות הבא של OAuth:
מידע נוסף זמין במדריך להרשאות.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-09-05 (שעון UTC).
[null,null,["עדכון אחרון: 2024-09-05 (שעון UTC)."],[[["This endpoint allows you to delete multiple messages in Gmail by providing a list of message IDs."],["The request is sent as a POST request to a specific URL with the user's email address as a path parameter."],["The request body requires a JSON object containing an array of message IDs to be deleted."],["Although it doesn't guarantee the existence or prior deletion status of the messages, it efficiently processes bulk message deletions."],["Proper authorization with the `https://mail.google.com/` scope is necessary for successful execution."]]],["This document details the process of batch deleting messages in Gmail via an API. It uses a `POST` request to `https://gmail.googleapis.com/gmail/v1/users/{userId}/messages/batchDelete`, specifying the user via the `userId` path parameter. The request body, in JSON format, contains an array `ids` of message IDs to be deleted. The response body is empty upon successful deletion. This action requires the `https://mail.google.com/` OAuth scope. No guarantees are made about the existence or prior deletion of specified message IDs.\n"]]