Using MobileFirst Foundation 8.0's Push Service REST API in a Node.js-based server
Thomas Südbröcker May 07, 2018MobileFirst_Foundation Push_Notifications NodeJS Bluemix Mobile_Foundation
It is nice and easy to send simple push notifications in MobileFirst Foundation 8.0 (from the MobileFirst Operations Console or via REST API), but how do you send push notifications which provides more complex data such as when temperature is low, when you’re driving too fast and so on. If you are an on-premise 8.0 customer or Mobile Foundation service customer, then read further to learn how to send push notifications which provides more complex information. To that end, I’ve implemented a mobile application that integrates several Bluemix services related to IoT, Watson services and so on.
Getting the Authorization key with Postman is not flexible enough, so instead I wrote a self-Authorization node.js module. This module enables me to easily creat different instances on one or more Node.js servers.
To get started, lets watch a video.
The Nodejs module I have created is available for download from this GitHub.com repository.
Please note tha this is only the Nodejs server. I expect you to have an already functioning application with push notifications capability. To quickly setup such an app, you can use the sample application provided in the MobileFirst Foundation Developer Center.
For setup instructions, refer to the GitHub repository.
Inclusive terminology note: The Mobile First Platform team is making changes to support the IBM® initiative to replace racially biased and other discriminatory language in our code and content with more inclusive language. While IBM values the use of inclusive language, terms that are outside of IBM's direct influence are sometimes required for the sake of maintaining user understanding. As other industry leaders join IBM in embracing the use of inclusive language, IBM will continue to update the documentation to reflect those changes.