List Notifications and Mark as Read In-Game

In this How-to, we’ll get all unread notifications for the logged in player, find a specific notification by a key and mark it as read.

Prerequisites

To get the matched notification to a previous action (an invoked trigger, a purchase call), you need one or more of the following:

  • A purchase using virtual currency: use the catalog_listing_id

  • An In App Purchase using Apple App Store: use the transaction_id

  • An In App Purchase using Google Pla Store: use the product_id

  • An In App Purchase using Steam Store: use the entitlement_id

  • A trigger: use the trigger_key

  • A twitch drop: use the twitch reward id

  • A custom notification from server, console, or admin api: use the notification type you set for the notification.

It is important to mark notifications as read after you have taken action on it, otherwise you will need to go through all notifications each time, which increases response times, resulting in a bad experience for your players.

Conclusion

In this How-to, we’ve listed a notification and marked it as read. Notifications are to be called after a purchase has been made or after an invoked trigger.

Last updated