Chat Thread - List Chat Participants

Gets the participants of a thread.

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

URI Parameters

Name In Required Type Description
chatThreadId
path True

string

Thread id to get participants for.

endpoint
path True

string

The endpoint of the Azure Communication resource.

api-version
query True

string

Version of API to invoke.

maxPageSize
query

integer

int32

The maximum number of participants to be returned per page.

skip
query

integer

int32

Skips participants up to a specified position in response.

Request Header

Name Required Type Description
Authorization True

string

An ACS (Azure Communication Services) user access token.

Responses

Name Type Description
200 OK

ChatParticipantsCollection

Request successful. The action returns the participants of a thread.

401 Unauthorized

CommunicationErrorResponse

Unauthorized.

403 Forbidden

CommunicationErrorResponse

Forbidden.

429 Too Many Requests

CommunicationErrorResponse

Too many requests.

Other Status Codes

CommunicationErrorResponse

Service unavailable.

Security

Authorization

An ACS (Azure Communication Services) user access token.

Type: apiKey
In: header

Examples

Get participants with pagination (max page size)

Sample Request

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

Sample Response

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

Definitions

Name Description
ChatParticipant

A participant of the chat thread.

ChatParticipantsCollection

Collection of participants belong to a particular thread.

ChatParticipant

A participant of the chat thread.

Name Type Description
communicationIdentifier

CommunicationIdentifierModel

displayName

string

Display name for the chat participant.

shareHistoryTime

string

Time from which the chat history is shared with the participant. The timestamp is in RFC3339 format: yyyy-MM-ddTHH:mm:ssZ.

ChatParticipantsCollection

Collection of participants belong to a particular thread.

Name Type Description
nextLink

string

If there are more chat participants that can be retrieved, the next link will be populated.

value

ChatParticipant[]

Chat participants.