How-to

Portal How-to: Enabling App Context

2 min read Oliver Carson on May 26, 2022
Portal How-to Enabling Objects.jpg

What is App Context?

The App Context feature provides easy-to-use, serverless storage to store metadata for users, channels, and memberships without setting up your database. You can optionally store metadata, including custom properties, for your application users. PubNub triggers events when object data is set or removed from the database, which means that you can receive these events in real time and update your front-end application accordingly. 

The Metadata API for PubNub can be used to get and set metadata for users, channels, channel memberships, and channel members. This API can also set the filtering language definition to filter for specific metadata in the database, and is similar to the stream filtering language.

Follow Along

Watch the video below or follow the step-by-step instructions to enable App Context in your PubNub keyset. Need extra information? You can also check out PubNub’s official documentation on App Context to learn more about how to implement App Context in your application.

Step-by-Step

  1. Login to the Admin Portal.

  2. Click on the apps tab on the left hand side of the portal.

  3. Click on an application. You will be brought to the keysets page for this application.

  4. Create a new keyset by clicking on the “Create New Keyset” button. You will be brought to the configuration page for this keyset.

  5. Enable the App Context feature by clicking the slider.

  6. The Region setting is the region where your objects are stored. Please note that the region cannot be modified after saving changes to the keyset.

  7. If the User and Channel Metadata Events settings are enabled, the user and channel metadata events are triggered when user or channel metadata is set or removed in the objects database, respectively.

  8. When the Membership Events setting is enabled, membership events are triggered when memberships are added, updated, or removed in the objects database.

  9. The final two settings Disallow Get All Channel and User Metadata settings, do not allow the “Get All Channel/User Metadata” calls, if enabled, respectively.

    1. These calls return a paginated list of channel/user metadata objects.

  10. Click on Save Changes to save these updated changes.

0