---
title: "Build a Video Chat Application with Python, JavaScript and Twilio Programmable Video"
description: "This tutorial builds a browser-based video chat application using Python, Flask, vanilla JavaScript, HTML, CSS, and Twilio Programmable Video. It adds text chat through Twilio Conversations and screen sharing, allowing participation on modern desktop and mobile browsers without installed software. The implementation covers Twilio account and API-key setup, environment variables, a Python virtual environment, client-side event handlers, and ngrok, which exposes the local Flask server through an HTTPS public URL for testing on other devices. The refreshed project targets Flask 3.x, twilio-python 9.x, Twilio Video JS 2.35.x, and Twilio Conversations classic JS 2.x, and the completed flow supports live calls, screen sharing, and text chat. Participants must use unique names because Twilio identifies them by token identity."
---

# Build a Video Chat Application with Python, JavaScript and Twilio Programmable Video

[Twilio](https://yomu.fyi/company/twilio) · Miguel Grinberg · Aug 26, 2026

**Type:** Tutorial

## Summary

This tutorial builds a browser-based video chat application using Python, Flask, vanilla JavaScript, HTML, CSS, and Twilio Programmable Video. It adds text chat through Twilio Conversations and screen sharing, allowing participation on modern desktop and mobile browsers without installed software. The implementation covers Twilio account and API-key setup, environment variables, a Python virtual environment, client-side event handlers, and ngrok, which exposes the local Flask server through an HTTPS public URL for testing on other devices. The refreshed project targets Flask 3.x, twilio-python 9.x, Twilio Video JS 2.35.x, and Twilio Conversations classic JS 2.x, and the completed flow supports live calls, screen sharing, and text chat. Participants must use unique names because Twilio identifies them by token identity.

## Context

The project provides an embedded alternative to sending users to a third-party video tool. It is intended for browser-based video communication, including use from computers and smartphones, while the development server runs locally behind a router or firewall.

## Approach / What changed

The application uses Flask and Python on the server, vanilla JavaScript in the browser, Twilio Programmable Video for video and audio, Twilio Conversations for text chat, and ngrok to expose the local server through a public HTTPS URL during development.

## Takeaways

- Twilio Programmable Video supplies the core video and audio functionality, while Twilio Conversations powers text chat.
- ngrok exposes the locally running Flask server through an HTTPS public URL so other computers and smartphones can connect during development.
- Participants need unique names because Twilio identifies them by token identity; a duplicate name causes the second connection to replace the first.

**Tags:** [Flask](https://yomu.fyi/topic/flask), [JavaScript](https://yomu.fyi/topic/javascript), [Python](https://yomu.fyi/topic/python), [Twilio](https://yomu.fyi/topic/twilio)

- Source: [Twilio](https://www.twilio.com/en-us/blog/build-video-chat-application-python-javascript-twilio-programmable-video)
- Source URL: https://www.twilio.com/en-us/blog/build-video-chat-application-python-javascript-twilio-programmable-video
- Ingested by Yomu: 2026-09-09T13:35:36.293Z

[Read original post](https://www.twilio.com/en-us/blog/build-video-chat-application-python-javascript-twilio-programmable-video)
