Method: spaces.findDirectMessage
지정된 사용자와의 기존 채팅 메시지를 반환합니다. 채팅 메시지 공간을 찾을 수 없는 경우 404 NOT_FOUND
오류를 반환합니다. 예를 보려면 채팅 메시지 찾기를 참고하세요.
앱 인증을 사용하여 지정된 사용자와 호출하는 Chat 앱 간의 채팅 메시지 스페이스를 반환합니다.
사용자 인증을 사용하여 지정된 사용자와 인증된 사용자 간의 채팅 메시지 공간을 반환합니다.
// 다음 유형의 인증을 지원합니다.
HTTP 요청
GET https://chat.googleapis.com/v1/spaces:findDirectMessage
URL은 gRPC 트랜스코딩 구문을 사용합니다.
쿼리 매개변수
매개변수 |
name |
string
필수 항목입니다. 채팅 메시지를 찾을 사용자의 리소스 이름입니다. 형식: users/{user} . 여기서 {user} 는 People API의 사용자를 나타내는 id 또는 Directory API의 사용자를 나타내는 id 입니다. 예를 들어 People API 프로필 ID가 123456789 인 경우 users/123456789 를 name 로 사용하여 해당 사용자와의 다이렉트 메시지를 찾을 수 있습니다. 사용자로 인증되면 이메일을 {user} 의 별칭으로 사용할 수 있습니다. 예를 들어 users/example@gmail.com 은 example@gmail.com 가 Google Chat 사용자의 이메일인 경우입니다.
|
응답 본문
성공한 경우 응답 본문에 Space
의 인스턴스가 포함됩니다.
승인 범위
다음 OAuth 범위 중 하나가 필요합니다.
https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.spaces.readonly
https://www.googleapis.com/auth/chat.bot
자세한 내용은 승인 가이드를 참고하세요.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-12(UTC)
[null,null,["최종 업데이트: 2024-11-12(UTC)"],[[["Retrieves the existing direct message with a specified user or Chat app, returning a 404 error if none is found."],["Supports both app authentication and user authentication for finding direct messages."],["Requires providing the resource name of the user in the `name` query parameter using specific formats."],["Uses a `GET` HTTP request to the `https://chat.googleapis.com/v1/spaces:findDirectMessage` endpoint with gRPC Transcoding syntax."],["Needs authorization with specific OAuth scopes like `chat.spaces`, `chat.spaces.readonly`, or `chat.bot`."]]],[]]