PATCH /v1/spaces/{spacesId}/messages/{messagesId}
Changed onUpdates a message. There's a difference between the patch and update methods. The patch method uses a patch request while the update method uses a put request. We recommend using the patch method. For an example, see Update a message. Supports the following types of authentication: - App authentication with the authorization scope: - https://www.googleapis.com/auth/chat.bot - User authentication with one of the following authorization scopes: - https://www.googleapis.com/auth/chat.messages - https://www.googleapis.com/auth/chat.import (import mode spaces only) When using app authentication, requests can only update messages created by the calling Chat app.
Request
- Base URLhttps://chat.googleapis.com
- URLhttps://chat.googleapis.com/v1/spaces/{spacesId}/messages/{messagesId}
- Auth
- OAuth 2 and OAuth 2Implicit: https://accounts.google.com/o/oauth2/authScopes: https://www.googleapis.com/auth/chat.botAuthorization code: https://accounts.google.com/o/oauth2/authToken URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/chat.bot
- or OAuth 2 and OAuth 2Implicit: https://accounts.google.com/o/oauth2/authScopes: https://www.googleapis.com/auth/chat.importAuthorization code: https://accounts.google.com/o/oauth2/authToken URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/chat.import
- or OAuth 2 and OAuth 2Implicit: https://accounts.google.com/o/oauth2/authScopes: https://www.googleapis.com/auth/chat.messagesAuthorization code: https://accounts.google.com/o/oauth2/authToken URL: https://accounts.google.com/o/oauth2/token scopes: https://www.googleapis.com/auth/chat.messages
Path parameters
Query parameters
Optional. If true and the message isn't found, a new message is created and updateMask is ignored. The specified message ID must be client-assigned or the request fails.
Required. The field paths to update. Separate multiple values with commas or use * to update all field paths. Currently supported field paths: - text - attachment - cards (Requires app authentication.) - cards_v2 (Requires app authentication.) - accessory_widgets (Requires app authentication.) - quoted_message_metadata (Only allows removal of the quoted message.)
Request body
Response
Successful response
Changes
- info
the security scope
https://www.googleapis.com/auth/chat.botwas added to the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/chat.botwas added to the endpoint's security schemeOauth2c - info
the security scope
https://www.googleapis.com/auth/chat.messageswas removed from the endpoint's security schemeOauth2 - info
the security scope
https://www.googleapis.com/auth/chat.messageswas removed from the endpoint's security schemeOauth2c
- info