1- Make sure your device is already registered before you attempt to set an Alias for it. In other words, don't attempt to do this directly after the initialization line.  For example: if your app has a login activity for example, The setAlias method should be invoked AFTER a successful login from your user,

2-Set the alias of the targeted user after registration:

window.plugins.PushbotsPlugin.setAlias("Test");

Then you can send to a specific user via PushBots Dashboard:

To remove the alias programmatically: 

window.plugins.PushbotsPlugin.removeAlias();
Did this answer your question?