Udostępnij za pośrednictwem


Chat Thread - Delete Chat Message

Usuwa komunikat.

DELETE {endpoint}/chat/threads/{chatThreadId}/messages/{chatMessageId}?api-version=2024-03-15-preview

Parametry identyfikatora URI

Nazwa W Wymagane Typ Opis
chatMessageId
path True

string

Identyfikator komunikatu.

chatThreadId
path True

string

Identyfikator wątku, do którego wysłano wiadomość.

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

Nazwa Wymagane Typ Opis
Authorization True

string

Token dostępu użytkownika acS (Azure Communication Services).

Odpowiedzi

Nazwa Typ Opis
204 No Content

Żądanie zakończyło się pomyślnie.

401 Unauthorized

CommunicationErrorResponse

Brak autoryzacji.

403 Forbidden

CommunicationErrorResponse

Zakazane.

429 Too Many Requests

CommunicationErrorResponse

Zbyt wiele żądań.

Other Status Codes

CommunicationErrorResponse

Usługa niedostępna.

Zabezpieczenia

Authorization

Token dostępu użytkownika acS (Azure Communication Services).

Typ: apiKey
W: header

Przykłady

Delete message

Przykładowe żądanie

DELETE https://contoso.westus.communications.azure.com/chat/threads/34adfa4f-cedf-4dc0-ba29-b6d1a69ab345/messages/1591768249318?api-version=2024-03-15-preview

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