A simple chat app powered by PubNub. Get started building using ChatEngine, our open and extensible framework for building web and mobile chat apps.
Authors: Stephen Blum

Open this demo in multiple browsers to send and receive messages in realtime.

Type Message and Press Enter
Chat Output

This is a basic chat example. The code to the left, you can build realtime chat in 10 lines of JavaScript - just copy and paste the code into your favorite text editor and save as a .html.

For production-level apps, we recommend using ChatEngine, our chat SDK and APIs that dramatically reduce coding time for building chat apps.

Send and Receive Messages

Tasks like sending and receiving data through PubNub take a single function call. The basic “send” functionality happens through a publish() call.

And to “receive” all of the sent messages on a specific channel, simply make a subscribe() call. All of the network infrastructure and scaling is taken care of for you, so you spend time building your app, not the infrastructure.

Over 70 SDKs Available

ChatEngine is cross-platform, supporting chat for mobile, browser, desktop, server, and even the Internet of Things. Build in one language, extend to every device!

Features Used

Try PubNub Today

Share this on facebookShare this on TwitterShare this on Linkedin