Welcome to the official PubNub Unreal Engine SDK repository. PubNub provides the infrastructure and APIs needed for the realtime communication layer of your application. You can focus on building your app's logic while PubNub ensures data is sent and received across the world in less than 100ms.
Below, you will find everything you need to begin messaging!
You will need publish and subscribe keys to authenticate your app. Get your keys from the Admin Portal.
- Download and install Unreal Engine version 5.0 or higher.
- Create a new blank Unreal project at a location of your choice.
- Create an empty
Pluginsfolder in the location of your Unreal project.
Within the Plugins folder of your Unreal project, clone the Unreal SDK repository: https://github.com/pubnub/unreal-engine.
Each PubNub API is available through Blueprints and C++ code. For further information on using and configuring the workspace and the Unreal Engine project, refer to the PubNub Unreal SDK documentation.
You can copy the Blueprints from the docs and paste them into your Unreal Editor.
PubNub provides three keys per keyset:
| Key | Safe for client builds | Purpose |
|---|---|---|
| Publish Key | Yes | Publish messages |
| Subscribe Key | Yes | Subscribe to channels |
| Secret Key | No | Root/admin access to the entire keyset |
The Secret Key grants unrestricted permissions on your keyset — publish on any channel, read history, mint or revoke PAM tokens, and modify App Context data. Never ship a Secret Key in a game client build.
Global plugin settings (Project Settings → Pubnub SDK) store only the Publish Key and Subscribe Key. These are safe to include in DefaultEngine.ini and packaged client builds.
Game clients (shipped builds):
- Configure only Publish Key and Subscribe Key (via plugin settings or
FPubnubConfig). - Obtain a scoped PAM v3 access token from your backend.
- Call
SetAuthTokenon the client before subscribing or publishing.
Dedicated servers / backend tooling:
- Provide the Secret Key in
FPubnubConfigwhen callingCreatePubnubClient— not in global plugin settings. - Load the Secret Key from a secure source (environment variable, server-only config, secrets manager).
- Use
GrantToken/RevokeToken/SetSecretKeyonly in server-side code.
For more details, see the PubNub Access Manager documentation.
If you need help or have a general question, contact support@pubnub.com.
This project is licensed under a custom MIT license. For more details about the license, refer to the License FAQ.
