Chat

How to integrate a 3rd party chat system into your project

Introduction

This guide will help projects wanting to use a chat system that integrates with a 3rd party chat provider (as opposed to the default unreal chat system provided). There are a number of benefits for rolling an integrated chat solution in your Unreal project:

  1. Scalability: 3rd party solutions can be better placed to handle the large volume of concurrent users and messages efficiently. This is particularly beneficial for projects developed on our platform, which expect thousands of users in one experience.

  2. Improved Performance: 3rd party chat solution providers are often better optimised for real-time, low-latency communication across global networks.

  3. Advanced Features: many third party solutions contain advanced features that would otherwise be difficult to implement/unavailable. These include features like:

    1. Presence Detection

    2. Built-in Moderation Capabilities

    3. Message Persistence and History

    4. Customizable Channels

For the purposes of this guide, we will be using Pubnub as our example. Pubnub's feature-rich free tier offers a variety of chat options that you may find useful for your project. They include:

  1. Up to 1 million total messages per month

  2. Data persistence of up to 1GB

  3. Custom function modules for Moderation

  4. Easy integration with Unreal via Pubnub APIs

Follow the steps below to get started with setting up your first Pubnub application!

Creating your Pubnub Application

Firstly, create an account with Pubnub. Then create a new app:

Once created, set up a new Keyset within the application, with an appropriate name (see above).

You can configure your keyset, however you like; to get started, we recommend configuring as follows:

  1. Presence: ON

    1. Defaults are usually fine

      1. Announce Max: 20

      2. Interval: 30

      3. Stream Filtering: ON

  2. App Context: ON

    1. Region: EU Central (or US)

    2. User Metadata Events: ON

    3. Channel Metadata Events: ON

    4. Membership Events: ON

  3. Message Persistence: ON

    1. Retention: 7days

    2. Enable Delete-From-History: ON

  4. Stream Controller: ON

    1. Enable Wildcard Subscribe: ON (but could be OFF ?)

  5. File Sharing: OFF

  6. Mobile Push Notifications: OFF

  7. Apple Push Notifications: OFF

  8. Firebase Cloud Messaging: OFF

If you want to strictly enable authed users only chatting for your keyset:

  1. EnableAccess Manager: ON

    1. Revoke v3 Token: ON

Next Steps

Once completed, you're ready to integrate with your newly created app and keyset!

🎮 To learn how to integrate Pubnub with your Unreal project, view our guide here!

💢 To learn how to set up custom functions like Modetation for your Pubnub keyset, view our guide here!

Last updated

Was this helpful?