Chat Thread - Add Chat Participants
Agrega participantes de subprocesos a un subproceso. Si los participantes ya existen, no se produce ningún cambio.
POST {endpoint}/chat/threads/{chatThreadId}/participants/:add?api-version=2024-03-07
Parámetros de identificador URI
Nombre | En | Requerido | Tipo | Description |
---|---|---|---|---|
chat
|
path | True |
string |
Identificador del subproceso al que agregar participantes. |
endpoint
|
path | True |
string |
Punto de conexión del recurso de Comunicación de Azure. |
api-version
|
query | True |
string |
Versión de la API que se va a invocar. |
Encabezado de la solicitud
Nombre | Requerido | Tipo | Description |
---|---|---|---|
Authorization | True |
string |
Un token de acceso de usuario de ACS (Azure Communication Services). |
Cuerpo de la solicitud
Nombre | Requerido | Tipo | Description |
---|---|---|---|
participants | True |
Participantes para agregar a un subproceso de chat. |
Respuestas
Nombre | Tipo | Description |
---|---|---|
201 Created |
Los participantes se agregaron correctamente. |
|
401 Unauthorized |
Communication |
Desautorizado. |
403 Forbidden |
Communication |
Prohibido. |
429 Too Many Requests |
Communication |
Demasiadas solicitudes. |
Other Status Codes |
Communication |
Servicio no disponible. |
Seguridad
Authorization
Un token de acceso de usuario de ACS (Azure Communication Services).
Tipo:
apiKey
En:
header
Ejemplos
Add participants
Solicitud de ejemplo
POST https://contoso.westus.communications.azure.com/chat/threads/19:f2167429acf6482880c6b7790a9086c1@thread.v2/participants/:add?api-version=2024-03-07
{
"participants": [
{
"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",
"shareHistoryTime": "2020-06-06T05:55:41Z"
},
{
"communicationIdentifier": {
"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"
}
},
"displayName": "Peter",
"shareHistoryTime": "2020-06-06T05:55:41Z"
},
{
"communicationIdentifier": {
"rawId": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce",
"communicationUser": {
"id": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f13a9208-0bb8-45c0-916c-f3ed922728ce"
}
},
"displayName": "Rama",
"shareHistoryTime": "2020-06-06T05:55:41Z"
}
]
}
Respuesta de muestra
{
"invalidParticipants": [
{
"target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_a34d2d65-d72f-4c48-a12c-2d5c9ac75a1a",
"code": "403",
"message": "Permissions check failed"
},
{
"target": "8:acs:8540c0de-899f-5cce-acb5-3ec493af3800_f6762773-e33a-4727-985f-50bd1d197c7b",
"code": "404",
"message": "Not found"
}
]
}
{
"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."
}
}
Definiciones
Nombre | Description |
---|---|
Add |
Participantes que se agregarán al subproceso. |
Add |
Resultado de la operación agregar participantes del chat. |
Chat |
Participante del subproceso de chat. |
AddChatParticipantsRequest
Participantes que se agregarán al subproceso.
Nombre | Tipo | Description |
---|---|---|
participants |
Participantes para agregar a un subproceso de chat. |
AddChatParticipantsResult
Resultado de la operación agregar participantes del chat.
Nombre | Tipo | Description |
---|---|---|
invalidParticipants |
Communication |
Los participantes que no se pudieron agregar al subproceso de chat. |
ChatParticipant
Participante del subproceso de chat.
Nombre | Tipo | Description |
---|---|---|
communicationIdentifier |
Communication |
|
displayName |
string |
Nombre para mostrar del participante del chat. |
shareHistoryTime |
string |
Hora desde la que se comparte el historial de chat con el participante. La marca de tiempo está en formato RFC3339: |