---
source_url: https://www.pubnub.com/docs/architecture/authentication/set-up-your-account
title: Set up your account and get your keys
updated_at: 2026-09-30T07:20:08.000Z
---

# Set up your account and get your keys

## Documentation index

To discover more PubNub resources:

1. Fetch [PubNub's llms.txt](https://www.pubnub.com/llms-full.txt) for a list of available pages in Markdown format.
2. Identify relevant URLs from that index.
3. Fetch the target pages.

Do not assume a path exists, always check the index first.

This guide shows you how to create a PubNub account, create an app and a keyset, and get the publish and subscribe keys your app passes to a PubNub SDK. It also shows you how to enable the features your app calls.

A keyset is the set of publish, subscribe, and secret keys that identifies your application to the PubNub network, and every feature you enable comes from that same keyset. Every step happens in the [Admin Portal](https://admin.pubnub.com/).

If you already have an account and an app, skip to [Create a keyset](#create-a-keyset).

## Create an account

[Sign up](https://admin.pubnub.com/#/register), or [log in](https://admin.pubnub.com/) with your username and password, Google single sign-on, or your own SSO provider.

## Create an app

You need at least one app before you can create a keyset.

1. Go to **Apps & Keysets**.
2. Select **Create app**.
3. Enter a name and select **Create**.

Create one app per project, then use separate keysets inside it for each environment such as development, QA, and production.

The Admin Portal **Apps** screen lists up to 100 apps. For an account with more than 100 apps, the list appears empty.

In that case, search by name in the **Apps** dropdown in the top navigation bar instead.

## Create a keyset

Create a keyset for your app:

1. Select your app to open its keysets list.
2. Select **Create keyset**.
3. Enter a name, choose **Testing** or **Production**, and click **Next**.
4. Configure the keyset services and click **Create**.

Choose **Production** if the keyset will carry live traffic. Creating a Production keyset requires at least the Starter plan. Testing keysets are rate-limited and aren't suitable for live traffic. A free PubNub account covers up to 200 monthly active users (MAUs) or 1 million transactions at no cost, whichever limit you reach first.

To decide how many keysets to create and how to map them to your environments, refer to [environment-aligned keys](https://www.pubnub.com/docs/architecture/authentication/overview.md#protecting-your-keys).

## Get your keys

Selecting a keyset opens its overview page, which shows all three keys.

1. Copy the publish key, which starts with `pub-c-`.
2. Copy the subscribe key, which starts with `sub-c-`.
3. Pass both to the SDK when you initialize PubNub, as shown in [Quickstart](https://www.pubnub.com/docs/getting-started/quickstart.md).

Copy the secret key only if your own server will generate [Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md) tokens.

The secret key grants privileged access to your PubNub application. It must remain on a trusted server and must never be included in client applications.

Always use the keys from your own keyset. Never use keys from another account or from someone else's keyset, including any published in a code sample or public repository.

## Enable the features your app calls

Features are keyset-level switches: flip once, all clients in that environment get it. While you are on the keyset overview page, turn on the ones your app needs:

* [Presence](https://www.pubnub.com/docs/presence/overview.md) if you need to know who is currently connected to a channel.
* [Message Persistence](https://www.pubnub.com/docs/data-storage/message-history/overview.md) if clients will fetch history or recover messages missed while offline.
* [App Context](https://www.pubnub.com/docs/data-storage/metadata/overview.md) if you want PubNub to store user, channel, and membership metadata.
* [File Sharing](https://www.pubnub.com/docs/data-storage/files/overview.md) if clients will send files on a channel.
* [Access Manager](https://www.pubnub.com/docs/security/access-control/overview.md) if you need to restrict which clients reach which resources.
* [Mobile Push Notifications](https://www.pubnub.com/docs/integrations/mobile-push-notifications/overview.md) if you need to reach disconnected devices. Add your [APNs](https://www.pubnub.com/docs/integrations/mobile-push-notifications/send-push-notifications-ios.md) or [FCM](https://www.pubnub.com/docs/integrations/mobile-push-notifications/send-push-notifications-android.md) credentials here as well.
* [Stream Controller](https://www.pubnub.com/docs/pub-sub/subscribe/channels.md) if you will use channel groups or wildcard subscribe.

Select any feature name to see its parameters and change them.

## Next steps

Once your account and keyset are ready, here's where to go next:

* [Quickstart](https://www.pubnub.com/docs/getting-started/quickstart.md) - initialize the SDK and publish your first message
* [Available SDKs](https://www.pubnub.com/docs/getting-started/available-sdks.md) - choose the SDK for your platform

## Related tasks

* [Rotate the secret key](https://www.pubnub.com/docs/security/access-control/initialize-server-sdk.md#secret-key-rotation) - stage replacement keys with future expiry dates
* [Store credentials for Functions](https://www.pubnub.com/docs/serverless-sdk/modules-and-libraries/vault.md) - keep third-party API keys out of your Function source
* [Forward keyset events to your systems](https://www.pubnub.com/docs/integrations/event-forwarding/overview.md) - send Presence, App Context, Message Persistence, and push events to Kafka, SQS, S3, or a webhook
* [Invite organization members](https://www.pubnub.com/docs/security/invite-organization-members.md) - give your team access and assign roles
* [Monitor usage and costs](https://www.pubnub.com/docs/analytics/overview.md) - track billable metrics, and set a [billing alert](https://www.pubnub.com/docs/pricing/overview.md) on Starter and Pro plans

Last updated at: 2026-09-30T07:20:08.000Z
