Ionic $ionicUser service problem


Hi everyone

I’m using Ionic $ionicUser service to identify a new user in order to use push notifications, track analytics etc.
In browser everything works perfect, so new user gets identify, and I’m able to see it on page.

However, when I install the app on android device $ionicUser service is not able to identify the user and http request ( which is performed when the $ionicUser.identify(user) gets executed) returns 404.
Request payload looks good, the same format as in browser, just with different data.

Here’s my code:

function identifyUser () {
$‘Ionic User: Identifying with Ionic User service’);

  var user = $ionicUser.get();
  if(!user.user_id) {
    // Set your user_id here, or generate a random one.
    user.user_id = $ionicUser.generateGUID();

  $'User object: ', user);

  // Add some metadata to your user object.
  angular.extend(user, {
    name: 'Ionitron',
    bio: 'I come from planet Ion'

  // Identify your user with the Ionic User Service
    $'Identified user ' + + '\n ID ' + user.user_id);
    alert('Identified user ' + + '\n ID ' + user.user_id);
  }, function(error) {

Any idea?


I figured it out.

I was missing cordova whitelist plugin which blocks/allows http requests (inter alia) from your app.
After downloading the plugin I had to add “” tag in config.xml file to allow all http requests from the app.