Aktualizuje wiadomość. Metody patch i update różnią się od siebie. Metoda patch używa żądania patch, a metoda update – put. Zalecamy użycie metody patch. Przykład znajdziesz w sekcji Aktualizowanie wiadomości.
Gdzie {space} to identyfikator pokoju, w którym opublikowano wiadomość, a {message} to przypisany do niej identyfikator systemu. Na przykład: spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB.
Jeśli podczas tworzenia wiadomości ustawisz niestandardowy identyfikator, możesz użyć tego identyfikatora do określenia wiadomości w żądaniu, zastępując {message} wartością z pola clientAssignedMessageId. Na przykład: spaces/AAAAAAAAAAA/messages/client-custom-name. Szczegółowe informacje znajdziesz w artykule Nazywanie wiadomości.
Opcjonalnie: Jeśli true i wiadomość nie zostaną znalezione, zostanie utworzona nowa wiadomość, a wartość updateMask zostanie zignorowana. Podany identyfikator wiadomości musi być przypisany przez klienta, w przeciwnym razie żądanie się nie powiedzie.
Treść żądania
Treść żądania zawiera wystąpienie elementu Message.
Treść odpowiedzi
W przypadku powodzenia treść odpowiedzi obejmuje wystąpienie elementu Message.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2025-02-27 UTC."],[[["Updates a Google Chat message using the `PUT` method, preferably with the `patch` approach for partial modifications."],["Requires providing the message's resource name in the URL path for identification."],["Allows specifying fields to update using `updateMask` and supports creating a new message if the original is missing with `allowMissing` set to `true`."],["Authentication can be done using app authentication or user authentication, with app authentication restricting updates to messages created by the calling Chat app."],["Needs authorization with specific OAuth scopes like `chat.bot`, `chat.import`, or `chat.messages`."]]],["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"]]