---
source_url: https://www.pubnub.com/docs/faq/getting-started
title: Getting started FAQ
updated_at: 2026-10-27T09:13:26.000Z
---

# Getting started FAQ

> For AI agents: documentation index at https://www.pubnub.com/llms-full.txt

Short answers to common questions about [getting started](https://www.pubnub.com/docs.md) with PubNub.

## Where do I start learning PubNub?

Start with these pages, in order:

1. [What is PubNub?](https://www.pubnub.com/docs.md) explains what PubNub provides and how its capabilities fit together.
2. [Set up your account and get your keys](https://www.pubnub.com/docs/architecture/authentication/set-up-your-account.md) gets you a keyset.
3. [Quickstart](https://www.pubnub.com/docs/getting-started/quickstart.md) publishes and receives your first message in the language you choose.
4. [Core concepts](https://www.pubnub.com/docs/architecture/core-concepts.md) defines messages, channels, User IDs, and timetokens.

To find the SDK for your platform, see [Available SDKs](https://www.pubnub.com/docs/getting-started/available-sdks.md).

## What are the demo keys for?

The demo keys are for sample apps and interactive demos on the PubNub website, such as the docs and the blog.

Anyone who subscribes to a channel on the demo keys receives the messages published to it. PubNub also throttles the demo keys to prevent abuse, so an app that uses them may not behave as you expect.

To develop and test your own app, [create a free account](https://admin.pubnub.com/#/register) and use your own keys.

## What is a User ID?

A User ID is the string that identifies a person or a server process to PubNub. One person uses the same User ID on all of their devices. [Presence](https://www.pubnub.com/docs/presence/overview.md) and [Message Persistence](https://www.pubnub.com/docs/data-storage/message-history/overview.md) rely on it. A User ID cannot exceed 92 UTF-8 characters.

Current SDKs require a User ID when you initialize PubNub and return an error if it's missing. Older SDK versions called it `UUID` and didn't require it, so they generated a random User ID for every connection, which affected usage metrics, billing, and Presence.

Keep a User ID the same for the lifetime of the person or machine it identifies, for example by passing it to the client after login or by storing it on the client. To tell one person's devices apart, include a device identifier in your messages or publish it as a separate message.

For more, see [User ID](https://www.pubnub.com/docs/architecture/core-concepts.md#user-id).

## What protocol does PubNub use?

PubNub delivers messages to subscribers over HTTP long-poll (HTTP/1.1 and HTTP/2). PubNub doesn't use WebSocket. The client holds each subscribe request open and resumes from a timetoken cursor with every new request.

Browser SDKs issue subscribe requests with the `fetch` API by default. The JavaScript SDK's `transport` option switches them to `XMLHttpRequest`, and the SDK doesn't switch on its own. Node.js SDKs use pooled HTTP/2 connections where the origin supports it.

For publishing, PubNub supports pipelining, so you can send any number of publishes on the same TCP connection without waiting for each response.

For how the transport works, see [Data transport and delivery](https://www.pubnub.com/docs/architecture/data-transport-and-delivery.md).

## Does PubNub support the UDP protocol?

No. PubNub doesn't support UDP. PubNub SDKs communicate over TCP connections only.

## How are PubNub SDKs licensed?

PubNub SDKs are free and open source under the MIT License, unless the SDK's license file says otherwise. The source code is on [PubNub's GitHub](https://github.com/pubnub/).

## When should I upgrade to a newer SDK version?

Use the latest version of your SDK to get new features, performance improvements, and bug fixes. Updating your apps about every six months is a good rhythm, though release cycles differ between projects.

Include minor SDK releases in your regular release cycle, and plan major releases as part of a larger release. To get updates on bug fixes and upcoming features, follow your SDK's repository on [GitHub](https://github.com/pubnub).

For how long older versions stay supported, see the EOL policy in your SDK's docs, for example the [JavaScript SDK EOL policy](https://www.pubnub.com/docs/sdks/javascript/end-of-life.md).

## Can users in China connect to PubNub?

Sometimes, but not reliably. The Great Firewall of China sometimes blocks PubNub domains, and PubNub can't influence how China blocks traffic.

To reduce the impact on your users and systems in China, use a custom domain for all calls to PubNub. A custom domain requires the Pro plan and at least one production keyset. When you request one, say that you have customers in China. See [Request a custom domain](https://www.pubnub.com/docs/security/encryption/request-custom-domain.md).

## Does PubNub offer a self-hosted solution?

No. PubNub is a hosted service only, and you can't run it on your own servers.

PubNub SDKs connect over TLS 1.2 by default, except the Lua SDK and the unsupported Twisted SDK, where you set `ssl` to `true`. You can also encrypt message content on the device. If SDK configuration sets a `cipherKey` without an explicit CryptoModule, the SDK defaults to legacy 128-bit encryption. For details, see [Encryption](https://www.pubnub.com/docs/security/encryption/overview.md).

## Does PubNub use Amazon messaging services?

No. PubNub doesn't use Amazon messaging services such as SQS or SNS. Those services solve a different problem and don't push data to devices in real time. To forward PubNub events to Amazon SQS or Kinesis, use [Events & Actions](https://www.pubnub.com/docs/integrations/event-forwarding/overview.md).

## How can I try PubNub without installing an SDK?

Use the Debug Console in the [Admin Portal](https://admin.pubnub.com/). It lets you subscribe to a channel and publish a message to it with your keyset, with no client code. To open it, select **Build → Debug Console** and choose your app and keyset. See [Test your keyset in the Debug Console](https://www.pubnub.com/docs/architecture/authentication/set-up-your-account.md#test-your-keyset-in-the-debug-console).

You can also call PubNub directly over HTTP with the [REST API](https://www.pubnub.com/docs/sdks/rest-api.md), for example to publish and subscribe from a command line. You still need a keyset, so [create a free account](https://admin.pubnub.com/#/register) first.

## How do I receive data with the REST API?

Subscribe in a loop with the REST API:

1. Send an HTTP GET subscribe request with `tt=0` and wait for the response.
2. Read the timetoken and region in the response.
3. Send them as `tt` and `tr` in the next subscribe request.
4. Repeat steps 2 and 3 each time data arrives.

The `tr` value keeps you on the same data center, so you don't receive duplicate messages. For the request format, see [Subscribe](https://www.pubnub.com/docs/sdks/rest-api/subscribe-v-2.md) in the REST API reference.

## Why use PubNub rather than push notifications?

PubNub can replace push notifications from APNs or FCM, or work alongside them. Choose PubNub when:

* Your app runs on devices from different vendors, and you want one interface that behaves the same on all of them.
* You need two-way communication. Push notification services generally can't confirm that a message arrived.
* The payload holds sensitive data. PubNub delivers messages over TLS and can also encrypt them. See [Encryption](https://www.pubnub.com/docs/security/encryption/overview.md).
* Your payloads are larger than push services allow. Compare the [mobile push limits](https://www.pubnub.com/docs/architecture/limits.md#mobile-push) with the [publish limits](https://www.pubnub.com/docs/architecture/limits.md#publish).
* Clients need to fetch messages they missed from [Message Persistence](https://www.pubnub.com/docs/data-storage/message-history/overview.md).
* You need to know who's online, with [Presence](https://www.pubnub.com/docs/presence/overview.md).

## How do I enable an add-on feature on my keyset?

Open the keyset's overview page in the [Admin Portal](https://admin.pubnub.com/) and select the feature name. The page shows that feature's parameters and lets you change them. Features are keyset-level settings, so enabling one applies to every client that uses the keyset. For the list of features and what each is for, see [Enable the features your app calls](https://www.pubnub.com/docs/architecture/authentication/set-up-your-account.md#enable-the-features-your-app-calls).

If you call an API whose feature is off, PubNub returns a "not enabled for this subscribe key" error. See [Why do I get "[XYZ] is not enabled for this subscribe key"?](https://www.pubnub.com/docs/faq/architecture.md#why-do-i-get-xyz-is-not-enabled-for-this-subscribe-key).

## Does PubNub provide webhooks?

Yes. [Events & Actions](https://www.pubnub.com/docs/integrations/event-forwarding/overview.md) forwards PubNub events to external systems, such as a webhook endpoint, a message queue, or a data lake. You set it up in the Admin Portal, with no SDK code.

## Does PubNub provide WebRTC or video chat?

No. PubNub doesn't stream audio or video. In a Web Real-Time Communication (WebRTC) app, clients stream media to each other directly. PubNub can carry the signaling messages the clients exchange before that connection exists, such as session control and network data. STUN and TURN servers, which find client addresses and relay media, aren't a PubNub service.

For details, see [Use PubNub for WebRTC signaling, not for media](https://www.pubnub.com/docs/design-patterns/architectural-choices.md#use-pubnub-for-webrtc-signaling-not-for-media).

## Where can I check PubNub's service status?

On the [PubNub Status page](https://status.pubnub.com/). You can subscribe to alerts, view past incident reports, and see graphs of the current state of PubNub services. Pingdom also monitors the PubNub network around the clock, and its reports are on [PubNub uptime](https://uptime.pubnub.com/).

## What if I need live support during my virtual event?

If your event has more than 10,000 concurrent users, tell PubNub at least 10 days before the event by filling in the [Virtual Events form](https://www.cognitoforms.com/PubNubInc/PubNubVirtualEventsCustomerForm). The form opens a support ticket that PubNub uses to communicate with you before the event. For live support during the event, you have two options:

* The Platinum Support Plan includes 5 hours of live support a month, with no rollover. To use those hours, select the opt-in box in the Virtual Events form.
* Buy a Virtual Events Package separately, without a support plan. See [Support plans](https://www.pubnub.com/support/plans/).

Last updated at: 2026-10-27T09:13:26.000Z
