How to integrate SuprSend inbox/feed components in Angular, Vue, VanillaJS, and other non-React frameworks.
@suprsend/web-components
We have upgraded authentication of inbox from HMAC to JWT as it is more secure. Please migrate to newer SDK if you are on old one.
suprsend-feed
, specify height for the container for infinite scroll to work properly.
new SuprSend()
when you call initSuprSend()
then you can access instance using window.suprsend.client
. This instance has methods like preferences, webpush, event and user updates.
Parameter | Description |
---|---|
publicApiKey | Public API Key is mandatory field without which error will be thrown by SuprSendProvider. You can get this from SuprSend Dashboard. |
distinctId | Unique identifier to identify a user across platform. If a value is passed SDK will create user and authenticate user. If null value is passed authenticated user’s instance data will be cleared in your application, kind of logout. |
userToken | Mandatory when enhanced security mode is on. This is ES256 JWT token generated in your server-side. Refer docs to create userToken. |
refreshUserToken | This function is called by SDK internally to get new userToken before existing token is expired. The returned JWT token string is used as the new userToken. |
userAuthenticationHandler | This callback will be called after authenticating user internally when you pass distinctId field to give you back the response of user creation API call. |
host | Customise the host url. |
vapidKey | This key is needed only if you are implementing WebPush notifications. You can get it in SuprSend Dashboard —> Vendors —> WebPush |
swFileName | This key is needed only if you are implementing WebPush notifications and want to customise default serviceworker.js file name with your own service worker file name. |