PubNub portal

Enabling Objects

portal objects 1200x630

What are Objects?

The Objects feature provides easy-to-use, serverless storage to store metadata for users, channels, and memberships without the need of setting up your own database. You can optionally store metadata, including custom properties, for your users in applications. 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 learn how to enable Objects in your PubNub keyset. Need extra information? You can also check out PubNub’s official documentation on Objects to learn more about how you can implement Objects in your own application.

  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 Objects 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.

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

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