Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
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를 설정한 경우 {message}를 clientAssignedMessageId 필드의 값으로 대체하여 요청에서 메시지를 지정할 수 있습니다. spaces/AAAAAAAAAAA/messages/client-custom-name를 예로 들 수 있습니다. 자세한 내용은 메일 이름 지정하기를 참고하세요.
|
쿼리 매개변수
| 매개변수 |
updateMask |
string (FieldMask format)
필수입니다. 업데이트할 필드 경로입니다. 쉼표로 여러 값을 구분하거나 *를 사용하여 모든 필드 경로를 업데이트합니다. 현재 지원되는 필드 경로:
|
allowMissing |
boolean
선택사항입니다. true 및 메시지를 찾을 수 없는 경우 새 메시지가 생성되고 updateMask은 무시됩니다. 지정된 메시지 ID는 클라이언트 할당이어야 합니다. 그렇지 않으면 요청이 실패합니다.
|
요청 본문
요청 본문에 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 계열사의 등록 상표입니다.
최종 업데이트: 2025-08-20(UTC)
[null,null,["최종 업데이트: 2025-08-20(UTC)"],[],["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"]]