Skip to content
The PubNub Network makes Real-time easy with a Simple Communications API. Two Functions: Send/Receive (Publish/Subscribe). We provide a web-service API for businesses to build scalable Data Push communication apps on Mobile, Tablet and Web. Bidirectional JSON. @PubNub - IRC #pubnub @
JavaScript ActionScript Python Monkey Ruby Perl Other
Find file
Latest commit 6cac98e @geremyCohen geremyCohen Update
Failed to load latest commit information.
android adding redirect
app-showcase moved examples to new JS Repo.
arduino moving repo
blackberry removing bb from main repo
c-libevent migrating
clojure Create LICENSE
cocoa migrating cocoa
coldfusion Create LICENSE
construct2 Create LICENSE
csharp-iis moving repo
csharp moving repo
erlang Create LICENSE
flash moving flash
games fixed multi-touch demo.
google-app-engine/python updated Google App Engine python API with imporved JSON import provid…
gwt removing gwt from main repo
j2me removing j2me from main repo
java removing java from main repo
javascript-modern migrating
javascript-webos migrating
javascript moved javascript repository to new separate repository.
lua-corona deleting lua-corona
lua-moai moving moai
monkey Create LICENSE
mono-for-android moving repo
mono-for-linux moving repo
mono-for-mac moving repo
monotouch moving repo
nodejs migrating
objective-c redirect readme
opa Create LICENSE
perl5 Create LICENSE
perl6 Create LICENSE
phonegap migrating
php-rackspace new PHP client supports Rackspace
php moving repo
python-tornado moving to new repo
python-twisted adding new RM
python pointing to new repo
qooxdo Create LICENSE
ruby-rhomobile Create LICENSE
ruby Update
sencha migrating
silverlight moving repo
sinatra Create LICENSE migrating
streams changed location of Stalker Code from streams dir to app-showcase dir.
titanium migrating
unity3d redirect
websocket Update
windows-phone-7 mv repo
.gitignore added custom uuid feature
.gitignore.orig merging CL-243
.project CL-108:Add Presence 3.2 to Android
.pydevproject CL-108:Add Presence 3.2 to Android Update
LICENSE Update LICENSE Update Update

Connecting everyone on Earth in < 0.25s !

PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!

Optimized for both web and mobile, our scalable, global network of redundant data centers provides lightning-fast, reliable message delivery. We're up to 100 messages/second faster than possible with WebSockets alone, and cross-platform compatibility across all phones, tablets, browsers, programming languages, and APIs is always guaranteed!

Support and Issues

Please email us at if you have any questions or issues with the client SDKs. Alternatively, you can open an issue in the Github repo of the client you have the concern about.

Supported Languages and Frameworks

The current list of supported languages and frameworks can be found on our github page.

Contact Us

Contact information for support, sales, and general purpose inquiries can found at

Demo and Webcast Links


Using Encryption with PubNub

For higher security applications, PubNub provides SSL and AES-based encryption features to help safeguard your data. Additional information and higher-level overviews of Cross-Platform AES Symmetric Key Encryption in general can be found in our blog post. A lower level diagram which details the PubNub encryption-communication flow can be found here.

HTTPS (SSL) 2048-bit Encryption

HTTPS is recommended for the highest level of security for REST requests to PubNub. Using REST over HTTPS is not required – however, for secure communication, you should make sure the client or REST toolkit you're using is configured to use SSL. The PubNub Cloud service will continue to support both HTTP and HTTPS.

AES Encryption

To enable AES encryption, instantiate a PubNub instance with the presence of the optional cipher_key attribute. The instance will use the value of the cipher_key attribute as the cipher key.

Message Signing with HMAC/SHA256

If the client is publishing, you must also include the secret_key attribute when instantiating the PubNub instance. If the client will only be subscribing, you do not need to include the secret_key attribute. The instance will use the value of the secret_key as the key to sign the message.

Secure Key Exchange

The exchange of the cipher key (and if the client is publishing, the secret key) must occur using a secure communication system, external to PubNub, in order to maintain secrecy of the keys.

For an example of using encryption with the PubNub JavaScript API, check out the PubNub Javascript Cryptography Demo page. The demo shows usage of the Cipher Key + SSL at the same time. There is not exchange however with a central authority server, which is a recommended step for distributing security keys. This example diagram with illustrate the recommended Central Authority Server model for proper Security Key Exchange.

REST API Considerations

In addition to platform-specific APIs, PubNub also supports a REST API.

Mandatory Headers

When using the REST API, it is mandatory to pass the following HTTP headers to the PubNub server for each request:

V: Version-Number
Accept: */*

Example Headers

V: 3.1
User-Agent: PHP
Accept: */*

Selecting a User-agent

Use one of the following User-Agents, based on your client platform, when making a REST-based request: *PHP, JavaScript, Node.JS, Ruby, Ruby-Rhomobile, Python, Python-Twisted, Python-Tornado, C-LibEV, C-LibEvent, C-Qt, VB, C#, Java, Java-Android, Erlang, Titanium, Corona, C-Arduino, C-Unity, C#-Mono, Lua, Obj-C-iOS, C#-WP7, Cocoa, Perl5

Something went wrong with that request. Please try again.