Group Chats

TalkJS also allows you to start a conversation with more than two people. If you don't need group chats, just skip to the next section.

Participants can be added or removed at any time during the lifetime of the conversation. Note: Group chats are limited to 50 participants on the Basic and Growth plans. On the Enterprise plan, the limit is customisable to fit your needs. For larger chat rooms that bypass this limit, see the documentation on Super Group Chats.

Let's define participants of the group chat first:

await Talk.ready;
const me = new Talk.User({
id: "123456",
name: "Alice",
const session = new Talk.Session({
appId: "YOUR_APP_ID",
me: me
const other1 = new Talk.User({
id: "654321",
name: "Sebastian",
const other2 = new Talk.User({
id: "456789",
name: "Steve",

Remember to replace YOUR_APP_ID with the data you can find in the dashboard at Better yet, log into the dashboard and navigate to the docs there and we'll have filled them out for you.

In order to start a conversation, you need to provide a distinguishable conversation ID.

await Talk.ready;
const conversation = session.getOrCreateConversation("CONVERSATION_ID");
photoUrl: "",
subject: "Beautiful Steel Preserve for rent!"
const chatbox = session.createChatbox();;

See getOrCreateConversation, setParticipant and setAttributes in the JS SDK reference for more information on how to set up and tune a conversation.

When you run this code, you should see something like this:

Loading chat...

Note that in this example we mounted the conversation inside a Chatbox, We could have just as easily used any other UI, or navigated a current UI to the new conversation using select.