Aktualisiert eine Nachricht. Es gibt einen Unterschied zwischen den Methoden patch und update. Bei der Methode patch wird eine patch-Anfrage verwendet, bei der Methode update eine put-Anfrage. Wir empfehlen die Verwendung der Methode patch. Ein Beispiel finden Sie unter Nachricht aktualisieren.
Dabei ist {space} die ID des Bereichs, in dem die Nachricht gepostet wird, und {message} eine vom System zugewiesene ID für die Nachricht. Beispiel: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB
Wenn Sie beim Erstellen einer Nachricht eine benutzerdefinierte ID festlegen, können Sie diese ID verwenden, um die Nachricht in einer Anfrage anzugeben. Ersetzen Sie dazu {message} durch den Wert aus dem Feld clientAssignedMessageId. Beispiel: spaces/AAAAAAAAAAA/messages/client-custom-nameWeitere Informationen
quotedMessageMetadata (Ermöglicht nur das Entfernen der zitierten Nachricht.)
allowMissing
boolean
Optional. Wenn true und die Nachricht nicht gefunden werden, wird eine neue Nachricht erstellt und updateMask wird ignoriert. Die angegebene Nachrichten-ID muss clientseitig zugewiesen sein. Andernfalls schlägt die Anfrage fehl.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-20 (UTC)."],[[["\u003cp\u003eUpdates a Google Chat message using the \u003ccode\u003ePATCH\u003c/code\u003e method, preferably over the \u003ccode\u003eupdate\u003c/code\u003e method which uses \u003ccode\u003ePUT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eSupports both app and user authentication, with app authentication limited to updating messages created by the calling Chat app.\u003c/p\u003e\n"],["\u003cp\u003eRequires specifying the message to update using its resource name in the URL path and the fields to update using the \u003ccode\u003eupdateMask\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eAllows creation of a new message if the original is not found when \u003ccode\u003eallowMissing\u003c/code\u003e query parameter is set to \u003ccode\u003etrue\u003c/code\u003e and a client-assigned message ID is provided.\u003c/p\u003e\n"],["\u003cp\u003eRequires authorization with one of the specified OAuth scopes (\u003ccode\u003echat.bot\u003c/code\u003e, \u003ccode\u003echat.import\u003c/code\u003e, or \u003ccode\u003echat.messages\u003c/code\u003e).\u003c/p\u003e\n"]]],["This documentation outlines how to update a message using the `PATCH` method via an HTTP request to `https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}`. The `message.name` path parameter is required, specifying the message's resource name. The `updateMask` query parameter is mandatory, indicating which fields to update (e.g., text, attachments). Optionally, `allowMissing` creates a new message if one isn't found. The request and response bodies utilize the `Message` resource, and app or user authentication are supported, with specific authentication impacting permissions.\n"],null,[]]