Flask

Build any chat use case into your Flask app

Quickly embed a customizable chat experience into your Flask app using the best chat APIs, feature-rich SDKs, and a highly customizable pre-built UI.
Hello, Magnus. Just a reminder, your dissertation deadline is this week. How are you coming along?
1m
Hi! I'm almost done, just finalizing edits and checking my citations.Just now
Great to hear! Anything you're worried about?
Just now
Just aiming to meet all the guidelines. I'll finish on time, I'm confident of that.Just now
If you need a review or have questions, let me know. Be sure to submit by the deadline.
Just now
Will do. Thanks for the support!Just now
Say something...
Quick integration

Connect users with a fully customizable chat using our real-time messaging infrastructure that works great with your Flask backend.

Drop-in chat UI

Ship faster by using pre-built components that are highly customizable. Get up and running in just 10 minutes.

Fully-featured

All the essential messaging features you need. Replies, mentions, typing indicators, link previews, emojis, and more.

Javascript SDK for client-side integration

For the client-side integrations, web and mobile, we offer a feature-rich JavaScript SDK. It comes with a customizable and pre-built chat UI that allows you to ship faster.

REST API for server-side integration

Use this library to access chat API endpoints server-side. Call the TalkJS REST API in order to manage messages, conversations and users from your backend.

1from flask import Flask, render_template
2
3app = Flask(__name__)
4
5@app.route("/")
6def render_talkjs():
7 user = { # Create a user, or fetch user data from your database
8 "id": "123456",
9 "name": "Alice",
10 "email": "alice@example.com",
11 "photoUrl": "https://talkjs.com/images/avatar-7.jpg",
12 "welcomeMessage": "Hey there! How are you? :-)",
13 }
14
15 app_id = "abcdef123" # Replace with your own app ID
16 conversation_id = "conversation_1"
17
18 other = { # Create a user, or fetch user data from your database
19 "id": "654321",
20 "name": "Sebastian",
21 "email": "sebastian@example.com",
22 "photoUrl": "https://talkjs.com/images/avatar-4.jpg",
23 "welcomeMessage": "Hey there! How can I help?",
24 }
25
26 return render_template(
27 "talkjs.html", user=user, app_id=app_id, conversation_id=conversation_id, other=other
28 )
We were able to offload all messaging to TalkJS — hugely simplifying our development of an otherwise complex stack.
Deryk Wenaus avatar
Deryk Wenaus
CTO, Retreat Guru

Ready-made chat UI you can customize

The chat UI comes with three different layouts — that are highly customizable — which you can mix and match to suit your needs. You have complete control over the styling, the layout, and document structure of the chat messages and the possibility to show metadata.

Inbox
The TalkJS Inbox shows the chat history on the left, selected conversation on the right. It's designed to act as the messaging center of your app, usually living on its own page.
Read the Inbox docs
Chatbox
The Chatbox is just the right half of the Inbox UI mode. It takes up less space and is designed to be embedded in your app near an order confirmation, a booking, or user profile.
Read the Chatbox docs
Popup
You can also show a conversation in a React popup that only shows up when the user clicks a button somewhere. When shown, the popup is positioned on the bottom right of your page.
Read the Popup docs