Udostępnij za pośrednictwem


Chat Thread - Remove Chat Participant

Usuń uczestnika z wątku.

POST {endpoint}/chat/threads/{chatThreadId}/participants/:remove?api-version=2024-03-07

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
chatThreadId
path True

string

Identyfikator wątku do usunięcia uczestnika.

endpoint
path True

string

Punkt końcowy zasobu usługi Azure Communication.

api-version
query True

string

Wersja interfejsu API do wywołania.

Nagłówek żądania

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

Nazwa Wymagane Typ Opis
Authorization True

string

Token dostępu użytkownika usług ACS (Azure Communication Services).

Treść żądania

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

Nazwa Typ Opis
participantCommunicationIdentifier

CommunicationIdentifierModel

Identyfikator uczestnika wątku do usunięcia z wątku.

Odpowiedzi

Nazwa Typ Opis
204 No Content

Żądanie powiodło się.

401 Unauthorized

CommunicationErrorResponse

Nieautoryzowanych.

403 Forbidden

CommunicationErrorResponse

Zakazany.

429 Too Many Requests

CommunicationErrorResponse

Zbyt wiele żądań.

Other Status Codes

CommunicationErrorResponse

Usługa jest niedostępna.

Zabezpieczenia

Authorization

Token dostępu użytkownika usług ACS (Azure Communication Services).

Typ: apiKey
W: header

Przykłady

Remove participant

Przykładowe żądanie

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

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

Przykładowa odpowiedź

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