Real-time Chat Blog

Using Chirp with PubNub for Chat

2 min read Chandler Mayo on Apr 19, 2019
Try PubNub Today

Free up to 1MM monthly messages. No credit card required.

Subscribe to our newsletter

By submitting this form, you are agreeing to our Terms and Conditions and Privacy Policy.

Chirp provides yet another way to bring users together on a real-time chat application – using simple audio chirps to instantly connect chatters.

This is the third and final part of a series of tutorials on building a chat application in JavaScript that uses audible chirps to connect users to the same channel using the Chirp WebAssembly SDK and PubNub JavaScript SDK. See the previous posts, How to Send Chat Invites Using Chirp (part 1) and Creating a Chat App with PubNub and Chirp (part 2), before continuing with this section.

Looking for the completed project? Download it from the Chirp PubNub Chat GitHub repo or try the demo.

Testing the Chat App

Although Chirp sends data completely offline, registration credentials are needed to identify your user account to the SDK, and to configure the SDK with your profile-specific features.

For web-based applications using the Chirp JavaScript or WebAssembly SDKs, applications are identified using your application key, and must be hosted on one of the web origins that you specify in the origins pane of your application.

CORS rules won’t allow the browser to load the Chirp WebAssembly SDK directly from the file system. You must host the files using a server. I recommend a http-server.

Installing the http-server

Install with NPM:

npm install http-server -g

Start the server from the same directory as your project files:


Add your origin to the origins pane of your application.

Chirp applications config

Visit http://localhost:8080 to view and test your chat application powered by Chirp and PubNub.

Use Chirp to connect users to the same chat.

What else can I do with PubNub and Chirp?

Some other applications for Chirp + PubNub could include:

Have suggestions or questions about the content of this post? Reach out at

More from PubNub

How to Add a Notification Badge to Icons in React Native
Real-time Chat BlogDec 19, 20226 min read

How to Add a Notification Badge to Icons in React Native

Display real-time notification badges with PubNub and React Native to display important information and bring users back to your...

Michael Carroll

Michael Carroll

Digital Twins and the Future of Real-Time Data
InsightsDec 6, 20224 min read

Digital Twins and the Future of Real-Time Data

The concept of Digital Twins has evolved over the last two decades, however, one thing remains the same: the need for real-time...

Michael Carroll

Michael Carroll

How Many Text Characters Fit in a 32KB PubNub Message?
Real-time Chat BlogNov 24, 20224 min read

How Many Text Characters Fit in a 32KB PubNub Message?

Learn the ins-and-outs of PubNub message size and get a better idea of how many text characters fit in a single message.

Michael Carroll

Michael Carroll