OneSignal PostNotification


#1

I am trying to send notifications via the native onesignal implementation however I am not sure how to build the notificationObj that is sent as parameter. Can somebody provide a working example or tell me what am I doing wrong?

My code:

var notificationObj = { 
  app_id: "XXXX-XXXXXXX",
  contents: {"en": "Message" },
  filters: [
      {"field": "tag", "key": "key", "relation": "=", "value": "someValue"}
  ]
};                          
this.oneSignal.postNotification(notificationObj);

#2

And that is what exactly?


#3