Share via


Chat Thread - Get Chat Message

ID でメッセージを取得します。

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

URI パラメーター

名前 / 必須 説明
chatMessageId
path True

string

メッセージ ID。

chatThreadId
path True

string

メッセージが送信されたスレッド ID。

endpoint
path True

string

Azure Communication リソースのエンドポイント。

api-version
query True

string

呼び出す API のバージョン。

要求ヘッダー

名前 必須 説明
Authorization True

string

ACS (Azure Communication Services) ユーザー アクセス トークン。

応答

名前 説明
200 OK

ChatMessage

要求が成功しました。 アクションはリソースを Message 返します。

401 Unauthorized

CommunicationErrorResponse

権限がありません。

403 Forbidden

CommunicationErrorResponse

Forbidden.

429 Too Many Requests

CommunicationErrorResponse

要求が多すぎます。

Other Status Codes

CommunicationErrorResponse

Service unavailable. (サービス利用不可。)

セキュリティ

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."
  }
}

定義

名前 説明
ChatAttachment

チャット メッセージの添付ファイル。 現在、Teams 相互運用シナリオでのみサポートされています。

ChatAttachmentType

添付ファイルの種類。

ChatMessage

チャット メッセージ。

ChatMessageContent

チャット メッセージの内容。

ChatMessageType

チャット メッセージの種類。

ChatParticipant

チャット スレッドの参加者。

ChatAttachment

チャット メッセージの添付ファイル。 現在、Teams 相互運用シナリオでのみサポートされています。

名前 説明
attachmentType

ChatAttachmentType

添付ファイルの種類。

id

string

添付ファイルの ID

name

string

添付ファイルの内容の名前。

previewUrl

string

添付ファイルのプレビューをダウンロードできる URL

url

string

添付ファイルをダウンロードできる URL

ChatAttachmentType

添付ファイルの種類。

名前 説明
file

string

image

string

ChatMessage

チャット メッセージ。

名前 説明
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

チャット メッセージの内容。

名前 説明
attachments

ChatAttachment[]

このメッセージの添付ファイルの一覧

initiatorCommunicationIdentifier

CommunicationIdentifierModel

message

string

テキストまたは html 型のメッセージのチャット メッセージ コンテンツ。

participants

ChatParticipant[]

種類が participantAdded または participantRemoved のメッセージのチャット メッセージ コンテンツ。

topic

string

topicUpdated 型のメッセージのチャット メッセージ コンテンツ。

ChatMessageType

チャット メッセージの種類。

名前 説明
html

string

participantAdded

string

participantRemoved

string

text

string

topicUpdated

string

ChatParticipant

チャット スレッドの参加者。

名前 説明
communicationIdentifier

CommunicationIdentifierModel

displayName

string

チャット参加者の表示名。

metadata

object

チャット参加者のコンテキスト メタデータ。 メタデータは、名前と値のペアで構成されます。 すべてのメタデータ ペアの合計サイズは、最大 1 KB です。

shareHistoryTime

string

チャット履歴が参加者と共有される時間。 タイムスタンプは RFC3339 形式です。 yyyy-MM-ddTHH:mm:ssZ