Get Started
The headless version of Novu’s notification library package provides users with a lightweight solution for integrating notification functionality into their web applications. With just the essential API methods, users can easily incorporate our notification system into any framework or vanilla JavaScript project, without being constrained by our default UI or dependencies.
Installation
Then, in your project import the headless service:
Initialize the session
To use the headless service and its features, you’ll need to first initialize the session:
Use your own backend and socket url
By default, Novu’s hosted services of API and socket are used. Should you want, you could override them and configure your own.
Fetch Notifications
fetchNotifications and other methods of the headless service should be used after initializing the session using headlessService.initializeSession
HMAC Encryption
To use the Hash-Based Message Authentication Codes pass the HMAC code to the headless service:
Realtime Sockets
Novu headless library provides listenUnseenCountChange API to listen to real-time socket changes and get updates about new notifications added to the user’s feed.
unseen count changes
unread count changes
If you’re ready to start using the Headless Notification Center, check out our guide!
Explore Implementation of the Headless Library in an App
Frequently Asked Questions
Was this page helpful?