다음을 통해 공유


Chat Thread - Add Chat Participants

스레드 참가자를 스레드에 추가합니다. 참가자가 이미 있는 경우 변경이 발생하지 않습니다.

POST {endpoint}/chat/threads/{chatThreadId}/participants/:add?api-version=2024-03-15-preview

URI 매개 변수

Name In(다음 안에) 필수 형식 Description
chatThreadId
path True

string

참가자를 추가할 스레드의 ID입니다.

endpoint
path True

string

Azure Communication 리소스의 엔드포인트입니다.

api-version
query True

string

호출할 API의 버전입니다.

요청 헤더

Name 필수 형식 Description
Authorization True

string

ACS(Azure Communication Services) 사용자 액세스 토큰입니다.

요청 본문

Name 필수 형식 Description
participants True

ChatParticipant[]

채팅 스레드에 추가할 참가자입니다.

응답

Name 형식 Description
201 Created

AddChatParticipantsResult

참가자가 성공적으로 추가되었습니다.

401 Unauthorized

CommunicationErrorResponse

권한이 없습니다.

403 Forbidden

CommunicationErrorResponse

사용할 수 없습니다.

429 Too Many Requests

CommunicationErrorResponse

요청이 너무 많습니다.

Other Status Codes

CommunicationErrorResponse

서비스를 사용할 수 없습니다.

보안

Authorization

ACS(Azure Communication Services) 사용자 액세스 토큰입니다.

Type: apiKey
In: header

예제

Add participants

Sample Request

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

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

Sample Response

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

정의

Name Description
AddChatParticipantsRequest

스레드에 추가할 참가자입니다.

AddChatParticipantsResult

채팅 참가자 추가 작업의 결과입니다.

ChatParticipant

채팅 스레드의 참가자입니다.

AddChatParticipantsRequest

스레드에 추가할 참가자입니다.

Name 형식 Description
participants

ChatParticipant[]

채팅 스레드에 추가할 참가자입니다.

AddChatParticipantsResult

채팅 참가자 추가 작업의 결과입니다.

Name 형식 Description
invalidParticipants

CommunicationError[]

채팅 스레드에 추가하지 못한 참가자입니다.

ChatParticipant

채팅 스레드의 참가자입니다.

Name 형식 Description
communicationIdentifier

CommunicationIdentifierModel

displayName

string

채팅 참가자의 표시 이름입니다.

metadata

object

채팅 참가자에 대한 컨텍스트 메타데이터입니다. 메타데이터는 이름/값 쌍으로 구성됩니다. 모든 메타데이터 쌍의 총 크기는 최대 1KB일 수 있습니다.

shareHistoryTime

string

채팅 기록이 참가자와 공유되는 시간입니다. 타임스탬프는 RFC3339 형식 yyyy-MM-ddTHH:mm:ssZ입니다.