본문으로 건너뛰기

애플리케이션 제어 메시지 전송

애플리케이션 서버는 API를 이용해 그룹 통화(컨퍼런스) 참여자에게 메시지를 보낼 수 있습니다.

지원 통화 유형최소 SDK 버전대응 SDK 이벤트
그룹 통화
  • Android, iOS/macOS, Windows: PlanetKit 3.3
  • Web: WebPlanetKit 5.2
  • Android: onAppControlMessageReceived
  • iOS/macOS: didReceiveAppControlMessage
  • Windows: OnReceivedAppControlMessage
  • Web: evtAppControlMessageReceived

메시지를 보내는 방식은 브로드캐스트(broadcast)와 멀티캐스트(multicast) 2가지가 있습니다. 브로드캐스트 방식은 참여자 모두에게 메시지를 보내며, 멀티캐스트는 참여자 중 특정 몇 사람에게 메시지를 보냅니다.

브로드캐스트

모든 참여자에게 메시지를 보냅니다.

메서드와 엔드포인트

  • 메서드: POST

  • 엔드포인트

    /tas/v1/gcall/{serviceId}/{roomId}/data/broadcast

헤더

  • Authorization: Basic {your credential}
  • Content-Type: text/plain

패스 파라미터

파라미터설명
serviceId서비스 ID
roomId방 ID

요청 본문

  • 형식: 일반 텍스트
  • 최대 본문 크기: 3,072 바이트

응답

없음

예제 1

앱 서버가 모든 참여자에게 "this is test control message."라는 메시지를 보내는 예제입니다. 필요한 값은 다음과 같다고 가정합시다.

  • service-id: ex-service
  • room-id: ex-room
curl --location --request \
POST 'https://vpnx-stn-api.line-apps.com/tas/v1/gcall/ex-service/ex-room/data/broadcast' \
--header 'Authorization: Basic YWxhZGRpbjpvcGVuX3Nlc2FtZQ==' \
--header 'Content-Type: text/plain' \
--data-raw 'this is a test control message.'

예제 2

앱 서버가 모든 참여자에게 자체 정의한 데이터를 보내는 예제입니다. 필요한 값은 다음과 같다고 가정합시다.

  • service-id: ex-service
  • room-id: ex-room
curl --location --request \
POST 'https://vpnx-stn-api.line-apps.com/tas/v1/gcall/ex-service/ex-room/data/broadcast' \
--header 'Authorization: Basic YWxhZGRpbjpvcGVuX3Nlc2FtZQ==' \
--header 'Content-Type: text/plain' \
--data-raw '{
"title": "this is JSON format example",
"sent": 1617277417048
}'

발생할 수 있는 HTTP 상태 코드

발생 가능한 HTTP 상태 코드는 다음과 같습니다. 자세한 내용은 오류 처리를 참조하세요.

  • 400, 401, 403, 404, 429, 500, 503

멀티캐스트

특정 참여자에게 메시지를 보냅니다. 대상자들의 사용자 ID를 지정해야 합니다.

메서드와 엔드포인트

  • 메서드: POST
  • 엔드포인트
/tas/v1/gcall/{serviceId}/{roomId}/data/multicast

헤더

  • Authorization: Basic {your credential}
  • Content-Type: text/plain

패스 파라미터

파라미터설명
serviceId서비스 ID
roomId방 ID

쿼리 파라미터

파라미터데이터 유형형식비고
user_idString사용자 ID를 쉼표(,)로 연결한 문자열. user-id-01,user-id-02,...,user-id-N최대 100개

아래는 쿼리 파라미터의 예시입니다.

{API URI}?user_id=user-01,user02,user-03

요청 본문

  • 형식: 일반 텍스트
  • 최대 본문 크기: 3,072 바이트

예제

앱 서버가 usr03과 usr05에게 "this is test control message."라는 메시지를 보냅니다. 필요한 값은 다음과 같다고 가정합시다.

  • service-id: ex-service
  • room-id: ex-room
curl --location --request \
POST 'https://vpnx-stn-api.line-apps.com/tas/v1/gcall/ex-service/ex-room/data/multicast?user_id=usr03,usr05' \
--header 'Authorization: Basic YWxhZGRpbjpvcGVuX3Nlc2FtZQ==' \
--header 'Content-Type: text/plain' \
--data-raw 'this is test control message.'

발생할 수 있는 HTTP 상태 코드

발생 가능한 HTTP 상태 코드는 다음과 같습니다. 자세한 내용은 오류 처리를 참조하세요.

  • 400, 401, 403, 404, 429, 500, 503