你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Chat Thread - Update Chat Participant

从线程更新参与者。

POST {endpoint}/chat/threads/{chatThreadId}/participants/:update?api-version=2021-10-01-preview7

URI 参数

名称 必需 类型 说明
chatThreadId
path True

string

父聊天线程的 ID。

endpoint
path True

string

Azure 通信资源的终结点。

api-version
query True

string

要调用的 API 版本。

请求头

Media Types: "application/json", "application/merge-patch+json"

名称 必需 类型 说明
Authorization True

string

ACS(Azure 通信服务)用户访问令牌。

请求正文

Media Types: "application/json", "application/merge-patch+json"

名称 必需 类型 说明
communicationIdentifier True

CommunicationIdentifierModel

displayName

string

聊天参与者的显示名称。

roleIds

string[]

此聊天参与者的角色标识符

shareHistoryTime

string (date-time)

聊天历史记录与参与者共享的时间。 时间戳采用RFC3339格式:yyyy-MM-ddTHH:mm:ssZ

响应

名称 类型 说明
204 No Content

请求成功。

401 Unauthorized

CommunicationErrorResponse

未经 授权。

403 Forbidden

CommunicationErrorResponse

禁止。

429 Too Many Requests

CommunicationErrorResponse

请求过多。

Other Status Codes

CommunicationErrorResponse

服务不可用。

安全性

Authorization

ACS(Azure 通信服务)用户访问令牌。

类型: apiKey
在: header

示例

Update participant

示例请求

POST https://contoso.westus.communications.azure.com/chat/threads/19:f2167429acf6482880c6b7790a9086c1@thread.v2/participants/:update?api-version=2021-10-01-preview7

{
  "communicationIdentifier": {
    "rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715",
    "communicationUser": {
      "id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_c94ff260-162d-46d6-94fd-e79f4d213715"
    }
  },
  "displayName": "Alex",
  "roleIds": [
    "8540c0de-899f-5cce-acb5-3ec493af3800_ce2142fd-aa87-435d-bacf-16efe5ae70aa"
  ]
}

示例响应

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

定义

ChatParticipant

聊天线程的参与者。

名称 类型 说明
communicationIdentifier

CommunicationIdentifierModel

displayName

string

聊天参与者的显示名称。

roleIds

string[]

此聊天参与者的角色标识符

shareHistoryTime

string (date-time)

聊天历史记录与参与者共享的时间。 时间戳采用RFC3339格式:yyyy-MM-ddTHH:mm:ssZ