Keysets
The Keysets subsection lets you configure PubNub features for each keyset.
Limit of 3 keysets for Free tier accounts
Effective February 3, 2025, all Free tier accounts will be limited to a maximum of three keysets. If your account exceeds this limit, you must delete existing keysets to create new ones.
Each keyset overview page shows:
-
Whether a keyset is of
Testing
orProduction
kind (depending on its purpose). -
Your app's publish, subscribe, and secret keys.
Each keyset contains a publish and subscribe key pair that work together to authenticate your application. The publish key (starts with
pub-c-
) authorizes sending messages, and the subscribe key (starts withsub-c-
) controls receiving messages and channel access. -
Current and available configuration options, like Presence, App Context, or Access Manager.
-
Recommended links to SDKs that can help you use the keys to build PubNub-powered apps.
Feature configuration
When you choose an app, you see all keysets assigned to it. Select a keyset to view its configurable features, including:
- Stream Controller
- Presence
- Access Manager
- Message Persistence
- App Context
- Mobile Push Notifications
- File Sharing
Each feature has parameters that control how it works.
When you create a keyset, some features start with default options.
To learn more about the available configuration options and the defaults, click the feature name.
Webhook configuration
Features that send events (Presence, App Context, Mobile Push Notifications, and Message Persistence) can forward events to configurable URLs. Create an event listener and attach a webhook action in Events & Actions.
Legacy webhook configuration
Webhooks used to be configurable on the Keysets page in Admin Portal. If you're on a paid plan, we will migrate your existing webhooks for you.
If you're on a free plan, refer to our webhook migration guide.
Manage secrets
The Manage secrets section allows you to create, update, and delete digital credentials for authentication purposes. Once created, you can use the secrets in Functions.
Roles with access
Only members with the Keyset Admin, Account Owner, and Account Admin roles can work with secrets.
You can add new entries to the vault by clicking the Create secret button, or, if you already have some entries, by clicking Edit in the top-right corner of the secrets table. Each new secret must have a name and a value.
Secret value visibility
For security, secret values aren't shown after creation.
The secrets table displays all entries by default. You can use the search box at the top of the table to filter through the results.
Secret key rotation
If you are on a paid plan, you can rotate secret keys on your keyset.
This feature helps you maintain a secure, compliant environment with PubNub services (such as Access Manager) by automating key management and avoiding reuse of compromised keys.
You can stage up to five secret keys with future expiry dates (including the current key).
You can view active and expired secret keys under the current key in the Admin Portal.
To set an expiry date for a secret key, select Rotate and use the date picker to choose the expiry time.