Start a new topic

push registration fails

I'm trying to register my device with kinvey using ionic. So, using the angularjs guide for push I'm sending my device ID and other details. 


Response is: 


debug"Cannot read property 'length' of undefined"description"Unable to understand request"error"BadRequest"


I checked in the API console too. I gave the device ID and auth token from the real device. It still gives the same error.


I have set everything in push config in kinvey. What am I missing? Thanks in advance!


Hello, I'm using the push notifications and I have same error.  My application mobil is made in Ionic but, the REST call I'm doing from endpoint in Kinvey... Is the right way? or is better from the app?


This is my code:


var json = {

         "platform": "android",

         "deviceId": idDispositivo,

         "userId": usuarioID,

}


var url = "https://baas.kinvey.com/push/kid_XXXXXXX/register-device";

       var datos = {

          uri: url,

          method: 'POST',

          headers: {

                Authorization : "Basic XXXXXXXXXXXXXM=",

                'Content-Type' : "application/json"

              },

          body : Json,

          json : true

        };


modules.request.request(datos, function(err, resp){.....}



Thanks :D

Hello Sirisha,


Can you please provide the code that you're using to push?   There a few different ways to do push with examples in our dev center:  http://devcenter.kinvey.com/html5/reference/business-logic/reference.html#push-module  None of these methods should have you interacting with the device id directly.


Thanks,

Login or Signup to post a comment