Chat

The chat tool allows participants to send and read messages during a video call.

Room Chat

With the Create Room API you can assign the chat tool to each participant of a room.

curl --request POST \
     --url https://api.sandbox.eu.bandyer.com/v2/rooms \
     --header 'accept: application/json' \
     --header 'apikey: your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "participants": [
    {
      "tools": {
        "chat": true
      },
      "user_id": "user1"
    },
    {
      "tools": {
        "chat": true
      },
      "user_id": "user2"
    }
  ]
}
'

The chat tool button will then be visible on the bottom right side of the call page, and if clicked it will open the chat sidebar.


Chat Web widget

In order to enable the chat within the Web SDK, you need to specify chat: true in the tools section of the SDK configuration.

Currently only 1-to-1 conversations are available in the chat widget.

const Client: Client = await BandyerSDK.configure({
    appId: 'web appId',
    region: 'eu | us | in | me',
    environment: 'sandbox | production',
    tools: {
      chat: true
    }
});

To add a chat between 2 participants, use the Create Channel API.

curl --request POST \
     --url https://api.sandbox.eu.bandyer.com/v2/chats \
     --header 'accept: application/json' \
     --header 'apikey: your_api_key' \
     --header 'content-type: application/json' \
     --data '
{
  "participants": [
    "user1",
    "user2"
  ]
}
'


๐Ÿ“˜

Chat message history

Chat messages that are exchanged inside the call page during a video call will be visible in the message history of the chat widget.

To delete the message history between 2 participants, use the Delete Channel API.