How to register a device through node.js Bluemix push API -


we developing mobile application. first, put registration option in mobile (bluemix js push api). but, security reason, moved (register device, push devicebyid,tag ..) options node.js server. use node.js bluemix push api, didn't find register device option there.

i installed:

npm install ibmbluemix npm install ibmpush 

i wrote following function on server side:

ibmpush.pushnotificationall(json.parse(req.body),function(response){          res.send(response);      });    ibmpush.pushnotificationdeviceids(json.parse(req.body),function(response){          res.send(response);      });   ibmpush.pushnotificationall(json.parse(req.body),function(response){          console.log("push sent successfully",response);          res.send(response);      }); 

please me register device through node.js push api.

assuming using mbaas backend application, there not way register device through node.js push api. can find javascript api documentation push here:

https://mobile.ng.bluemix.net/mbaas-api/docs/javascript/ibmpushservice.html

if using imf backend application, can use rest api register device. can find imf rest api documentation here:

https://mobile.ng.bluemix.net/imfrestapi/imfswagger/docs#!/push/registerdevice_post_15


Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -