Skip to main content
Version: 1.5.x

Using React In-App Inbox Component

Engagespot React component helps you to build a notification feed for your React.js app. This library includes React components to build a Notification Inbox component in your app.

Quick Setup

You can add a notification feed to your React app in minutes with the pre-built UI Components and APIs powered by Engagespot.

npm install @engagespot/react-component

Then render Engagespot component where you want the bell icon to appear.

import { Engagespot } from '@engagespot/react-component';

<Engagespot
apiKey="ENGAGESPOT_API_KEY"
userId="unique-id-of-your-user"
dataRegion="us" //eu or us
userToken="Required if secure auth is enabled on your Engagespot app"
/>;

You can find your ENGAGESPOT_API_KEY from your Engagespot Console.

What is userId?

As explained in the basic concepts chapter, userId should be any value to uniquely identify your app's users. It can be their email id, or UUID or a numerical id from your database. This value usually comes from your backend.

What is userToken?

The userToken is a token (JWT) generated for your users by your secure backend server using a secret private key generated from Engagespot console. This ensures secure authentication for your user's In-App inbox. Find more details on generating the userToken here.

warning

You must enable secure authentication mode for your production apps; otherwise, unauthorized access to your users' inbox messages is possible.