Application control message
Application servers can send any messages to participants in a group call (conference) through APIs.
Supported call type | Minimum SDK version | Counterpart SDK event |
---|---|---|
Group call |
|
|
There are two methods to send application data: broadcast and multicast. The broadcast method sends a message to all joining participants and the multicast method sends a message only to specific participants among joining participants.
Broadcast
Sends a message to all joining participants.
Method and endpoint
-
Method: POST
-
Endpoint
/tas/v1/gcall/{serviceId}/{roomId}/data/broadcast
Header
- Authorization:
Basic {your credential}
- Content-Type: text/plain
Path parameters
Parameter | Description |
---|---|
serviceId | Service ID |
roomId | Room ID |
Request body
- Body type: Plain text
- Maximum body size: 3,072 bytes
Response
N/A
Example 1
The app server sends "this is a test control message" to all participants. Let's suppose the following:
service-id
: ex-serviceroom-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'
Example 2
The app server sends application-defined data to all participants. Let's suppose the following:
service-id
: ex-serviceroom-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
}'
Possible HTTP status codes
Possible HTTP status codes are as follows. For more information, see Error handling.
- 400, 401, 403, 404, 429, 500, 503
Multicast
Sends a message to specific joining participants. The application must designate destination user IDs.
Method and endpoint
- Method: POST
- Endpoint
/tas/v1/gcall/{serviceId}/{roomId}/data/multicast
Header
- Authorization:
Basic {your credential}
- Content-Type: text/plain
Path parameters
Parameter | Description |
---|---|
serviceId | Service ID |
roomId | Room ID |
Query parameters
Parameter | Type | Format | Note |
---|---|---|---|
user_id | String | A string of user IDs concatenated with commas (,). user-id-01,user-id-02,...,user-id-N | Maximum number of IDs is 100 |
The following is an example of a query parameter.
{API URI}?user_id=user-01,user02,user-03
Request body
- Body type: Plain text
- Maximum body size: 3,072 bytes
Example
The app server sends "this is a test control message" to usr03 and usr05. Let's suppose the following:
service-id
: ex-serviceroom-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 a test control message'
Possible HTTP status codes
Possible HTTP status codes are as follows. For more information, see Error handling.
- 400, 401, 403, 404, 429, 500, 503