Portal How-to: Creating Keys

2 min read Oliver Carson on May 26, 2022
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.

Follow this step-by-step how-to on creating keys in your PubNub portal.

What are Keys?

When you create an account in the PubNub Admin Portal, the first set of API keys are demo keys that are automatically generated for you. While fine for quick testing, this automatically generated keyset is rate-limited and not suitable for production level environments. You’ll want to create your own keyset for each environment of your application, such as for production, testing, and QA, so you can avoid these limits and can customize each keyset to suit your needs. 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 keyset as required.

To get started, there are a few features that you’ll want to enable to begin using PubNub in your own application. Follow along with the video or read the step-by-step guide to get your own API keys.

Follow Along

Watch the video below or follow the step-by-step instructions to learn how to create keys. Need extra information? Check out PubNub’s official documentation on getting started to learn more about how to build your own PubNub application.


  • Login to the Admin Portal.

  • Click on the Apps tab on the left-hand-side.

  • Click on the “Create New App” button to create a new application. Give the application a name and click the “Create” button. 

  • Click on your newly created app. You will be brought to the keysets page for this application. Note that each application created automatically generates a new keyset for you, but you will be creating a new keyset to enable specific features.

  • Click the “Create New Keyset” button on the upper right hand-side of the portal.

  • A pop-up appears. Give the keyset a name and click the “Create” button.

  • Click on the newly created keyset.

  • Enable three features for the keyset to be able to connect to the PubNub Network: Presence, Message Persistence and Stream Controller.

  • Enable Presence by clicking on the slider to turn it on. A pop-up will require that you enter in “ENABLE”. Enter in “ENABLE” in all caps and then press the “Enable” button. You can leave the default settings.

  • Enable Message Persistence by clicking on the slider to turn it on. You can leave the default settings.

  • Enable Stream Controller by clicking on the slider to turn it on if it is already not enabled. You can leave the default settings.

  • Click on the “Save Changes” button in the bottom right corner of the portal. After a few seconds, a confirmation message will appear in the upper-left corner of the portal confirming that these changes have been saved. 

  • Scroll back to the top of the portal. Copy the Publish and Subscribe Keys to a text editor by clicking on the copy icons next to each key field. You’ll need these keys later on.

More from PubNub

Building a Core Product Strategy that Meets a Market Need
News Jun 1, 20221 min read

Building a Core Product Strategy that Meets a Market Need

Patrick Ng, Innovation Director at Spark Launchpad, joins Casey Clegg, COO at PubNub, to discuss effective ideation and the...

PubNub Staff

PubNub Staff

Can Empathy Exist in the Metaverse
News May 16, 20221 min read

Can Empathy Exist in the Metaverse

A roundtable discussion led by PubNub’s COO, Casey Clegg, exploring the topics of what it means to be human in a virtual world.

PubNub Staff

PubNub Staff

How to Advance Telehealth and Virtual Care Technologies
News May 2, 20221 min read

How to Advance Telehealth and Virtual Care Technologies

Dr. Joe Kvedar, Chair of the Board for the American Telemedicine Association, joins our COO, Casey Clegg, to discuss why...

PubNub Staff

PubNub Staff