Push notification with WP rest api?

#1

Hey guys!

I am fetching news in my app with wordpress rest api from my website. I am just wondering if anyone can tell me how could i implement a push notification when a new article is submitted on my site so the user can open the app and see the fresh news.

Onesignal would be good but i have no idea how to start this

#2

Onesignal is for browsers, if you’re making an ionic app I’d imagine you’d want actual push notifications not browser notifications?

In which case this looks like a better option: https://wordpress.org/plugins/push-notifications-for-wp/

Ultimately you need a way to send push notifications from Wordpress. Once you have that you should be able to use the push Ionic Native plugin.

#3

OneSignal is not only for browsers, it’s also for Ionic (and many more), check the docs of Ionic and OneSignal to know how to implement it :

Ionic documentation for OneSignal
OneSignal documentation for Ionic

Furthermore, there is an official plugin for Wordpress