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

That might work! thank you

「いいね!」 1

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