Room

JavaScript Widget Room API

Create public room

window.chatWidgetApi.createPublicRoom(roomName).then((roomID)=>{console.log(roomID)})
Method Name
Description
Parameters
Return Values

window.chatWidgetApi.createPublicRoom

Create a public group chat with the roomName

roomName

roomIDa

Create private room

window.chatWidgetApi.createPrivateRoom(roomName).then((roomID)=>{console.log(roomID)})
Method Name
Description
Parameters
Return Values

window.chatWidgetApi.createPrivateRoom

Create a private group chat with the roomName

roomName

roomID

Create DM

window.chatWidgetApi.createDMRoom(userId).then((roomId)=>{console.log(roomId)})
Method Name
Description
Parameters
Return Values

window.chatWidgetApi.createDMRoom

Invite user to a private chat

userId

roomId

Join a chat room

window.chatWidgetApi.joinRoom(roomID)
Method Name
Description
Parameters
Return Values

window.chatWidgetApi.joinRoom

Join a chat room corresponding to the roomid

roomID

N/A

Invite user to a chat

window.chatWidgetApi.invite(roomID, userID)
Method Name
Description
Parameters
Return Values

window.chatWidgetApi.invite

Invite user to a group chat

  1. roomID

  2. userID

N/A

Last updated