Chat Thread - Get Chat Message
ID でメッセージを取得します。
GET {endpoint}/chat/threads/{chatThreadId}/messages/{chatMessageId}?api-version=2025-03-15
URI パラメーター
| 名前 | / | 必須 | 型 | 説明 |
|---|---|---|---|---|
|
chat
|
path | True |
string |
メッセージ ID。 |
|
chat
|
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 |
要求が成功しました。 このアクションは、 |
|
| 401 Unauthorized |
Communication |
許可されていません。 |
| 403 Forbidden |
Communication |
禁じられた。 |
| 429 Too Many Requests |
Communication |
要求が多すぎます。 |
| Other Status Codes |
Communication |
サービスを使用できません。 |
セキュリティ
Authorization
ACS (Azure Communication Services) ユーザー アクセス トークン。
型:
apiKey
/:
header
例
Get Message
要求のサンプル
GET https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1591768249318?api-version=2025-03-15
応答のサンプル
{
"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."
}
}
定義
| 名前 | 説明 |
|---|---|
|
Chat |
チャット メッセージの添付ファイル。 |
|
Chat |
添付ファイルの種類。 |
|
Chat |
チャット メッセージ。 |
|
Chat |
チャット メッセージの内容。 |
|
Chat |
チャット メッセージの種類。 |
|
Chat |
チャット スレッドの参加者。 |
ChatAttachment
チャット メッセージの添付ファイル。
| 名前 | 型 | 説明 |
|---|---|---|
| attachmentType |
添付ファイルの種類。 |
|
| id |
string |
添付ファイルの ID |
| name |
string |
添付ファイルのコンテンツの名前。 |
| previewUrl |
string (uri) |
添付ファイルのプレビューをダウンロードできる URL |
| url |
string (uri) |
添付ファイルをダウンロードできる URL |
ChatAttachmentType
添付ファイルの種類。
| 値 | 説明 |
|---|---|
| image | |
| file |
ChatMessage
チャット メッセージ。
| 名前 | 型 | 説明 |
|---|---|---|
| content |
チャット メッセージの内容。 |
|
| createdOn |
string (date-time) |
チャット メッセージがサーバーに到着したときのタイムスタンプ。 タイムスタンプは |
| deletedOn |
string (date-time) |
メッセージが削除されたときのタイムスタンプ (該当する場合)。 タイムスタンプは |
| editedOn |
string (date-time) |
メッセージが編集されたときの最後のタイムスタンプ (該当する場合)。 タイムスタンプは |
| id |
string |
チャット メッセージの ID。 この ID はサーバーによって生成されます。 |
| metadata |
object |
メッセージ メタデータ。 |
| senderCommunicationIdentifier |
Communication |
|
| senderDisplayName |
string |
チャット メッセージ送信者の表示名。 このプロパティは、プッシュ通知の送信者名を設定するために使用されます。 |
| sequenceId |
string |
会話内のチャット メッセージのシーケンス。 |
| type |
チャット メッセージの種類。 |
|
| version |
string |
チャット メッセージのバージョン。 |
ChatMessageContent
チャット メッセージの内容。
| 名前 | 型 | 説明 |
|---|---|---|
| attachments |
このメッセージの添付ファイルの一覧 |
|
| initiatorCommunicationIdentifier |
Communication |
|
| message |
string |
テキストまたは html 型のメッセージのチャット メッセージ コンテンツ。 |
| participants |
種類 participantAdded または participantRemoved のメッセージのチャット メッセージ コンテンツ。 |
|
| topic |
string |
topicUpdated 型のメッセージのチャット メッセージ コンテンツ。 |
ChatMessageType
チャット メッセージの種類。
| 値 | 説明 |
|---|---|
| text | |
| html | |
| topicUpdated | |
| participantAdded | |
| participantRemoved |
ChatParticipant
チャット スレッドの参加者。
| 名前 | 型 | 説明 |
|---|---|---|
| communicationIdentifier |
Communication |
|
| displayName |
string |
チャット参加者の表示名。 |
| metadata |
object |
チャット参加者のコンテキスト メタデータ。 メタデータは、名前と値のペアで構成されます。 すべてのメタデータ ペアの合計サイズは、最大 1 KB です。 |
| shareHistoryTime |
string (date-time) |
チャット履歴が参加者と共有される時間。 タイムスタンプは |