다음을 통해 공유


Chat Thread - Get Chat Message

ID로 메시지를 가져옵니다.

GET {endpoint}/chat/threads/{chatThreadId}/messages/{chatMessageId}?api-version=2024-03-15-preview

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
chatMessageId
path True

string

메시지 ID입니다.

chatThreadId
path True

string

메시지를 보낸 스레드 ID입니다.

endpoint
path True

string

Azure Communication 리소스의 엔드포인트입니다.

api-version
query True

string

호출할 API의 버전입니다.

요청 헤더

Name 필수 형식 Description
Authorization True

string

ACS(Azure Communication Services) 사용자 액세스 토큰입니다.

응답

Name 형식 Description
200 OK

ChatMessage

요청이 성공했습니다. 작업은 리소스를 반환합니다 Message .

401 Unauthorized

CommunicationErrorResponse

권한이 없습니다.

403 Forbidden

CommunicationErrorResponse

사용할 수 없습니다.

429 Too Many Requests

CommunicationErrorResponse

요청이 너무 많습니다.

Other Status Codes

CommunicationErrorResponse

서비스를 사용할 수 없습니다.

보안

Authorization

ACS(Azure Communication Services) 사용자 액세스 토큰입니다.

Type: apiKey
In: header

예제

Get Message

Sample Request

GET https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1591768249318?api-version=2024-03-15-preview

Sample Response

{
  "id": "1591768249318",
  "sequenceId": "1",
  "type": "text",
  "version": "1599016601134",
  "content": {
    "message": "Let's head out for lunch in 15 minutes."
  },
  "senderDisplayName": "Jane",
  "createdOn": "2020-06-10T05:50:49.3180000Z",
  "senderCommunicationIdentifier": {
    "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b",
    "communicationUser": {
      "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_0e59221d-0c1d-46ae-9544-c963ce56c10b"
    }
  },
  "metadata": {
    "someKey1": "someValue1",
    "someKey2": "someValue2"
  }
}
{
  "error": {
    "code": "Unauthorized",
    "message": "Request is not authorized."
  }
}
{
  "error": {
    "code": "Forbidden",
    "message": "User is not allowed to perform specified action."
  }
}
{
  "error": {
    "code": "TooManyRequests",
    "message": "Rate limit exceeded."
  }
}
{
  "error": {
    "code": "ServiceUnavailable",
    "message": "The server is currently unable to handle the request."
  }
}

정의

Name Description
ChatAttachment

채팅 메시지의 첨부 파일입니다. 현재 Teams Interop 시나리오에서만 지원됩니다.

ChatAttachmentType

첨부 파일의 형식입니다.

ChatMessage

채팅 메시지.

ChatMessageContent

채팅 메시지의 콘텐츠입니다.

ChatMessageType

채팅 메시지 유형입니다.

ChatParticipant

채팅 스레드의 참가자입니다.

ChatAttachment

채팅 메시지의 첨부 파일입니다. 현재 Teams Interop 시나리오에서만 지원됩니다.

Name 형식 Description
attachmentType

ChatAttachmentType

첨부 파일의 형식입니다.

id

string

첨부 파일의 ID

name

string

첨부 파일 콘텐츠의 이름입니다.

previewUrl

string

첨부 파일의 미리 보기를 다운로드할 수 있는 URL

url

string

첨부 파일을 다운로드할 수 있는 URL

ChatAttachmentType

첨부 파일의 형식입니다.

Name 형식 Description
file

string

image

string

ChatMessage

채팅 메시지.

Name 형식 Description
content

ChatMessageContent

채팅 메시지의 콘텐츠입니다.

createdOn

string

채팅 메시지가 서버에 도착한 타임스탬프입니다. 타임스탬프는 RFC3339 형식 yyyy-MM-ddTHH:mm:ssZ입니다.

deletedOn

string

메시지가 삭제된 타임스탬프(해당하는 경우)입니다. 타임스탬프는 RFC3339 형식 yyyy-MM-ddTHH:mm:ssZ입니다.

editedOn

string

메시지가 편집된 마지막 타임스탬프(해당하는 경우)입니다. 타임스탬프는 RFC3339 형식 yyyy-MM-ddTHH:mm:ssZ입니다.

id

string

채팅 메시지의 ID입니다. 이 ID는 서버가 생성됩니다.

metadata

object

메시지 메타데이터.

senderCommunicationIdentifier

CommunicationIdentifierModel

senderDisplayName

string

채팅 메시지 보낸 사람의 표시 이름입니다. 이 속성은 푸시 알림의 보낸 사람 이름을 채우는 데 사용됩니다.

sequenceId

string

대화의 채팅 메시지 시퀀스입니다.

type

ChatMessageType

채팅 메시지 유형입니다.

version

string

채팅 메시지의 버전입니다.

ChatMessageContent

채팅 메시지의 콘텐츠입니다.

Name 형식 Description
attachments

ChatAttachment[]

이 메시지의 첨부 파일 목록

initiatorCommunicationIdentifier

CommunicationIdentifierModel

message

string

텍스트 또는 html 형식의 메시지에 대한 채팅 메시지 콘텐츠입니다.

participants

ChatParticipant[]

참가자 형식의 메시지에 대한 채팅 메시지 콘텐츠추가됨 또는 참가자리모브됨.

topic

string

topicUpdated 형식의 메시지에 대한 채팅 메시지 콘텐츠입니다.

ChatMessageType

채팅 메시지 유형입니다.

Name 형식 Description
html

string

participantAdded

string

participantRemoved

string

text

string

topicUpdated

string

ChatParticipant

채팅 스레드의 참가자입니다.

Name 형식 Description
communicationIdentifier

CommunicationIdentifierModel

displayName

string

채팅 참가자의 표시 이름입니다.

metadata

object

채팅 참가자에 대한 컨텍스트 메타데이터입니다. 메타데이터는 이름/값 쌍으로 구성됩니다. 모든 메타데이터 쌍의 총 크기는 최대 1KB일 수 있습니다.

shareHistoryTime

string

채팅 기록이 참가자와 공유되는 시간입니다. 타임스탬프는 RFC3339 형식 yyyy-MM-ddTHH:mm:ssZ입니다.