Search code examples
javascriptphpjsongetstream-io

How can I get an unseen/unread notification count from the API?


I am using PHP. I want the unread/unseen count from PHP without using the JavaScript real time notifications library. How would I do this?

I see in the JavaScript library you get back the following information:

"data": {
    "deleted": "array activities or aggregated activities",
    "new": "array activities or aggregated activities",
    "unread":"int only sent for notification feeds",
    "unseen":"int only sent for notification feeds",
    "published_at":"time in iso format",
},

Solution

  • The only way you can receive updates server-side with PHP is by requesting access to web-hooks or Amazon SQS updates.

    More information about this feature is available in the documentation here.