Live chat for Flask

Flask keeps things small, and so does this: the chat is a line in your base template, and knowing who is writing takes three lines of standard-library Python.

Free plan forever · No card required

Why XACUBE here

Standard library only

Signing a user uses hmac and hashlib, which ship with Python, so there is nothing to add to requirements.txt.

Works with Flask-Login

Use current_user from Flask-Login or your own session to sign the id, and the inbox shows each user by name.

No websockets on your server

A chat built into Flask needs a websocket server and a worker setup. XACUBE runs that part, so your app stays a plain WSGI app.

Live in three steps

  1. 1Create a free XACUBE account, add your domain and copy the code and secret key.
  2. 2Paste the code just before </body> in templates/base.html.
  3. 3Optionally set XACUBE_SECRET_KEY in the environment and render the signed version for logged-in users, then deploy.
Full install guide

What you get

Signed-in customers

Your server signs the customer’s id, so the inbox shows their real name and nobody can pretend to be them.

One shared inbox

Every conversation from every website in one place. Assign, resolve and reopen, and share a link to any chat.

Live visitors

See who is on your site right now, with country flag, page, device and browser, before they write a word.

Images and drawing

Visitors and your team send JPG, PNG, WebP and GIF up to 15 MB, open them full screen and draw on them to point something out.

Questions and answers

Is there a Flask extension for it?

None is needed. The chat is a template line and identity is one hmac.new call, so there is no extension to register on your app.

Does it work with Django too?

Yes. Django has its own install guide: the code goes in your base template, and the signing works the same way.

Where should the secret key live?

In an environment variable read with os.environ. Compute the hash on the server and pass only the result to the template.

What do anonymous visitors see?

The same chat. Without a signed id they chat anonymously, and you can still ask for their name, email or phone in the pre-chat form.

Add live chat to your website today

Create a free account, add your site and answer your first visitor in a few minutes.

Start free

Free plan forever · No card required