View this page in our documentation


Are you looking to send push notifications to your users on an individual basis?

Do you want to send your users a push notifiction when certain events happen, such as:

  • when member receives a message
  • when members receives comment on post

This is fully supported with GoNative, but requires proper configuration. 

It requires:

  1. Ability to associate a user account in your system with the user's device and its OneSiginalUserId
  2. Sending push notifications programmatically using OneSignal's Server REST API, based on specific events occuring in your backend
For #1, you will need to associate a user's account with their deviceId. For this, please see our documentation on "registration service" at You will also find some documenation in-line when configuring your app at under Push Notifications -> Registration Service. 
If you would like to trigger the registration service using Javascript, and especially if you have extra data to send to your server along with the OneSignal deviceId information, please use the following technique: 
We've implemented the ability to send the OneSignal registration information along with your custom data in javascript. You can set the "URL Regex" for the registration service to something like "nevermatch" so that it never matches any real URL, and would then only be sent when you invoke the javascript outlined below. The POST Endpoint you specify will still be used. 

if (navigator.userAgent.indexOf('gonative') > -1) {

var info = {userId: 'user_xyz'};
var json = JSON.stringify(info);
window.location.href='gonative://registration/send?customData=' + encodeURIComponent(json);



You may then use the javascript sample above to send that parameter along with the OneSignal device information. It will be sent whenever that javascript is run. The extra JSON data is optional. You may leave it blank by setting var info = {}. 
Once you have linked user accounts to deviceIds (sometimes called "OneSignalPlayerId" or "OneSignalUserId"), you can move on to #2. 
For #2, you will be using OneSignal's Server REST API to send push notifications programmatically. When hitting OneSignal's API, you may specify a set of OneSignalUserIds to target with your message. More info at