Getting the notification count via API

Hi there,
I’m trying to get the notification count via the API to implement on our website.

I’ve managed to get all the notifications for the users, but the suggested way of counting all the “read”:false isn’t a good way to go about it. The usual behavior for resetting the counter is to click on your avatar, and most users (including myself) do not click the dismiss button to actually dismiss the unread messages.
By counting all the “read”:false that you get from the notification.json you will still get the same count of unread even after pressing the avatar icon. This is rather frustrating for users.

Instead of educating all users, is there a simpler way to just get a live read of the notification counter?

Any thoughts/ideas/suggestions?

I’d try /session/current.json, which has unread_notifications, but if a notification isn’t dismissed or read, I think it will still count anyway.

2 Likes

That might work! thank you

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.