Partager via


Chat Thread - List Chat Participants

Obtient les participants d’un thread.

GET {endpoint}/chat/threads/{chatThreadId}/participants?api-version=2024-03-15-preview
GET {endpoint}/chat/threads/{chatThreadId}/participants?maxPageSize={maxPageSize}&skip={skip}&api-version=2024-03-15-preview

Paramètres URI

Nom Dans Obligatoire Type Description
chatThreadId
path True

string

ID de thread pour lequel obtenir les participants.

endpoint
path True

string

Point de terminaison de la ressource Azure Communication.

api-version
query True

string

Version de l’API à appeler.

maxPageSize
query

integer

int32

Nombre maximal de participants à retourner par page.

skip
query

integer

int32

Ignore les participants jusqu’à une position spécifiée dans la réponse.

En-tête de la demande

Nom Obligatoire Type Description
Authorization True

string

Jeton d’accès utilisateur ACS (Azure Communication Services).

Réponses

Nom Type Description
200 OK

ChatParticipantsCollection

Demande réussie. L’action retourne les participants d’un thread.

401 Unauthorized

CommunicationErrorResponse

Non autorisé.

403 Forbidden

CommunicationErrorResponse

Interdit.

429 Too Many Requests

CommunicationErrorResponse

Trop grand nombre de requêtes.

Other Status Codes

CommunicationErrorResponse

Service indisponible.

Sécurité

Authorization

Jeton d’accès utilisateur ACS (Azure Communication Services).

Type: apiKey
Dans: header

Exemples

Get participants with pagination (max page size)

Exemple de requête

GET https://contoso.westus.communications.azure.com/chat/threads/19:f2167429acf6482880c6b7790a9086c1@thread.v2/participants?maxPageSize=2&api-version=2024-03-15-preview

Exemple de réponse

{
  "value": [
    {
      "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": "Jane",
      "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": "Alex",
      "shareHistoryTime": "2020-06-06T05:55:41Z"
    }
  ],
  "nextLink": "https://contoso.westus.communications.azure.com/chat/threads/19:453dafb77b26481ea2e73bcada0324af@thread.v2/participants?skip=2&maxPageSize=2&api-version=2024-03-15-preview"
}
{
  "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."
  }
}

Définitions

Nom Description
ChatParticipant

Un participant du fil de conversation.

ChatParticipantsCollection

La collection de participants appartient à un thread particulier.

ChatParticipant

Un participant du fil de conversation.

Nom Type Description
communicationIdentifier

CommunicationIdentifierModel

displayName

string

Nom d’affichage du participant à la conversation.

metadata

object

Métadonnées contextuelles pour le participant à la conversation. Les métadonnées se composent de paires nom/valeur. La taille totale de toutes les paires de métadonnées peut atteindre 1 Ko.

shareHistoryTime

string

Heure à partir de laquelle l’historique de conversation est partagé avec le participant. L’horodatage est au format RFC3339 : yyyy-MM-ddTHH:mm:ssZ.

ChatParticipantsCollection

La collection de participants appartient à un thread particulier.

Nom Type Description
nextLink

string

Si d’autres participants à la conversation peuvent être récupérés, le lien suivant est rempli.

value

ChatParticipant[]

Participants à la conversation.