PubNub Account Setup

Build real-time applications that perform reliably and securely, at a global scale. Create an account to get started.

The first set of API keys generated for you when you create an account is called Demo Keyset and consists of a publish key, a subscribe key, and a secret key. These keys are rate-limited. To help you get started learning and using the various PubNub features and APIs, your Demo Keyset already has some PubNub services enabled by default.

When you're ready to push the PubNub Network a bit more, create a new set of keys, preferably in a new app, on the Admin Portal. Any new API keys that you create aren't rate-limited, and have fewer PubNub services enabled by default. You'll enable services on your API keys as required.

Demo and placeholder keys

You may come across keys called myPublishKey and mySubscribeKey in the documentation. These are placeholders that you replace with your own publish and subscribe keys.

You may also come across keys with a value of demo. These are severely rate-limited (throttled) keys for demonstration purposes in code samples and blog posts, and not suitable for your own use.

Environment-Aligned Keys

You should create multiple PubNub API keys (pub/sub keys) for a given application, so that your developers can implement new features and fix bugs while your QA team verifies that the next version is ready for production, all while your customers remain unaffected. Use the Admin Portal to add API keys to an existing app and consistently configure their features (such as Presence, Message Persistence, and Mobile Push) as required.

For example, in your Admin Portal, you might have two PubNub Apps, each with three sets of API keys:

AppAPI Keys
DateNight App
  • Development Keys
  • QA Keys
  • Production Keys
TheGuideUpdate App
  • Development Keys
  • QA Keys
  • Production Keys

Admin Portal helps you distinguish between your testing and production keysets by labelling them according to their purpose.

Production/Testing Keysets

Testing type of keysets have limits and are unsuitable for production usage. Production type of keysets can only be created on a paid pricing plan (Starter or Pro).

Pricing Model

PubNub offers the Monthly Active User (MAU) pricing model, which is based on the number of unique users that connect to PubNub at least once in a calendar month.

The MAU model is the most suitable when your use case involves users connecting and using services multiple times per month. Not only does the MAU model make it easier to estimate costs, as it's based on the number of users or devices that connect in a month, but also provides a simple metric to forecast cost.

Unique User ID

The MAU model is inseparably linked to the User ID parameter that represents a user signing in to one or multiple devices. Always set the User ID in the client configuration to uniquely identify the user that connects to PubNub. The User ID is reused for every application session and should remain unchanged for the lifetime of the user.

If you don't set the User ID, you won't be able to connect to PubNub.

If your use case involves many clients that connect infrequently, or a mix of some heavy-traffic clients and some that connect for a short period, contact sales to discuss the available options.

Refer to Pricing for complete details on the pricing model and free accounts, and to Transaction Classification for details on the different transaction types.

Next Steps

Learn about setting up your application to initialize and use PubNub correctly: visit Application Setup.

Last updated on