PubNub is a developer API platform that powers the real-time communication in apps where online communities can connect. This integration allows your team to use Marketbase as a dashboard for moderating, reviewing, and flagging messages that go through PubNub platform – without any additional code.
Go to your Marketbase dashboard and select your workspace that you would like to integrate PubNub with.
Open 'Settings' page and scroll down to the 'Integrations' section.
Click 'Add integration'.
Click on 'PubNub' from the dropdown.
Click 'Create'.
From the settings page, you should now see your newly created PubNub integration with webhook keys. These are the keys that you will copy to PubNub on step #3 to finalize the integration.
From your admin dashboard on PubNub, click on 'Keysets' and then select your app to see all keysets associated with your application:
Click 'Create new keyset' and give it the label to use for your Marketbase integration (eg. 'Marketbase'):
Click 'Create' to create your new keyset.
From your PubNub navigation, go to the "Events & Actions" page and select your app and the Keyset that you created in step #2 (eg. 'Marketbase').
Click on "+ Event Listener".
Select "Messages" event listener category.
Set configuration on event listener:
Click on 'Save changes'.
PubNub will prompt to confirm. After reading, type "ACTIVATE" in the prompt and click 'Activate'.
Go back on the 'Events & Actions' page.
Click '+ Action':
Select 'Webhook' action category.
Copy and paste the 'URL' on Marketbase to 'Webhook URL' on PubNub.
Set the first 'additional header' to:
Now we can associate this action to the event listener we just created.
Click '+ Create Event Listener'.
Click 'Choose an existing' from the menu.
Click the label for the event listener you had created.
Click 'Save changes'.
You're all done! This new event listener and action on PubNub will now push new message events to Marketbase.
After integration, send messages as you normally would through PubNub and then ensure new conversations, messages, and users are being populated on the Marketbase dashboard.
If you are running into any problems or need to load legacy data, feel free to email us at support@marketbase.app for help.