Cập nhật một tin nhắn. Có sự khác biệt giữa phương thức patch và update. Phương thức patch sử dụng yêu cầu patch, còn phương thức update sử dụng yêu cầu put. Bạn nên sử dụng phương thức patch. Để biết ví dụ, hãy xem phần Cập nhật thông báo.
Trong đó, {space} là mã nhận dạng của phòng Chat nơi tin nhắn được đăng và {message} là mã nhận dạng do hệ thống chỉ định cho tin nhắn. Ví dụ: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.
Nếu đặt một mã nhận dạng tuỳ chỉnh khi tạo thông báo, bạn có thể dùng mã nhận dạng này để chỉ định thông báo trong một yêu cầu bằng cách thay thế {message} bằng giá trị trong trường clientAssignedMessageId. Ví dụ: spaces/AAAAAAAAAAA/messages/client-custom-name. Để biết thông tin chi tiết, hãy xem bài viết Đặt tên cho tin nhắn.
quotedMessageMetadata (Chỉ cho phép xoá tin nhắn được trích dẫn.)
allowMissing
boolean
Không bắt buộc. Nếu true và không tìm thấy thông báo, thì một thông báo mới sẽ được tạo và updateMask sẽ bị bỏ qua. Mã thông báo được chỉ định phải là do ứng dụng khách chỉ định, nếu không yêu cầu sẽ không thành công.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-08-13 UTC."],[[["\u003cp\u003eUpdates a Google Chat message using the \u003ccode\u003ePUT\u003c/code\u003e method, preferably with the \u003ccode\u003epatch\u003c/code\u003e approach for partial modifications.\u003c/p\u003e\n"],["\u003cp\u003eRequires providing the message's resource name in the URL path for identification.\u003c/p\u003e\n"],["\u003cp\u003eAllows specifying fields to update using \u003ccode\u003eupdateMask\u003c/code\u003e and supports creating a new message if the original is missing with \u003ccode\u003eallowMissing\u003c/code\u003e set to \u003ccode\u003etrue\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eAuthentication can be done using app authentication or user authentication, with app authentication restricting updates to messages created by the calling Chat app.\u003c/p\u003e\n"],["\u003cp\u003eNeeds authorization with specific OAuth scopes like \u003ccode\u003echat.bot\u003c/code\u003e, \u003ccode\u003echat.import\u003c/code\u003e, or \u003ccode\u003echat.messages\u003c/code\u003e.\u003c/p\u003e\n"]]],["This describes updating messages in Google Chat using either `patch` or `put` requests, recommending `patch`. The `PUT` request uses the format `https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}`. Updating requires specifying the `message.name` path parameter and the `updateMask` query parameter to identify fields to modify. Optional `allowMissing` creates a new message if one is not found. The request and response body are `Message` instances. Authorization requires specific OAuth scopes. App authentication can update messages from the calling app only.\n"],null,[]]