Method: spaces.messages.patch
메시지를 업데이트합니다. patch
메서드와 update
메서드에는 차이가 있습니다. patch
메서드는 patch
요청을 사용하고 update
메서드는 put
요청을 사용합니다. patch
메서드를 사용하는 것이 좋습니다. 예를 보려면 메시지 업데이트하기를 참고하세요.
다음 유형의 인증을 지원합니다.
앱 인증을 사용하는 경우 요청은 호출하는 Chat 앱에서 만든 메시지만 업데이트할 수 있습니다.
HTTP 요청
PATCH https://chat.googleapis.com/v1/{message.name=spaces/*/messages/*}
URL은 gRPC 트랜스코딩 문법을 사용합니다.
경로 매개변수
매개변수 |
message.name |
string
식별자. 메시지의 리소스 이름입니다. 형식: spaces/{space}/messages/{message} 여기서 {space} 는 메시지가 게시된 스페이스의 ID이고 {message} 는 메시지에 시스템에서 할당한 ID입니다. spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB 를 예로 들 수 있습니다. 메시지를 만들 때 커스텀 ID를 설정하면 이 ID를 사용하여 {message} 를 clientAssignedMessageId 필드의 값으로 바꿔 요청에서 메시지를 지정할 수 있습니다. spaces/AAAAAAAAAAA/messages/client-custom-name 를 예로 들 수 있습니다. 자세한 내용은 메시지 이름 지정하기를 참고하세요.
|
쿼리 매개변수
매개변수 |
updateMask |
string (FieldMask format)
필수 항목입니다. 업데이트할 필드 경로입니다. 여러 값은 쉼표로 구분하거나 * 를 사용하여 모든 필드 경로를 업데이트합니다. 현재 지원되는 필드 경로는 다음과 같습니다.
|
allowMissing |
boolean
선택사항입니다. true 인데 메시지가 발견되지 않으면 새 메시지가 생성되고 updateMask 가 무시됩니다. 지정된 메시지 ID는 client-assigned되어야 합니다. 그렇지 않으면 요청이 실패합니다.
|
요청 본문
요청 본문에 Message
의 인스턴스가 포함됩니다.
응답 본문
성공한 경우 응답 본문에 Message
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/chat.bot
https://www.googleapis.com/auth/chat.import
https://www.googleapis.com/auth/chat.messages
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-04(UTC)
[null,null,["최종 업데이트: 2024-11-04(UTC)"],[[["Updates a Google Chat message using the `PATCH` method, preferably over the `update` method which uses `PUT`."],["Supports both app and user authentication, with app authentication limited to updating messages created by the calling Chat app."],["Requires specifying the message to update using its resource name in the URL path and the fields to update using the `updateMask` query parameter."],["Allows creation of a new message if the original is not found when `allowMissing` query parameter is set to `true` and a client-assigned message ID is provided."],["Requires authorization with one of the specified OAuth scopes (`chat.bot`, `chat.import`, or `chat.messages`)."]]],[]]