OneSignal Player_ID import with Wappler

Hi everybody.

I set up an account with onesignal.com for push notification.

Because I would like to send push notification to user in a restricted area of the website, I would import in my db their own onesignal identification code. So I will know which device correspond to whom to send custom push Services.

I followed the HTTPS procedure, but from their own explanation I do not understand how to import the UUiD produced by onesignal to my database.

They suggest the following event handler:

OneSignal.push(function() {
  OneSignal.on('subscriptionChange', function(isSubscribed) {
    if (isSubscribed) {
      // The user is subscribed
      //   Either the user subscribed for the first time
      //   Or the user was subscribed -> unsubscribed -> subscribed
      OneSignal.getUserId( function(userId) {
        // Make a POST call to your server with the user ID
      });
    }
  });
});

I do not understand how to integrate it in Wappler (i m not a coder at all!!)

Can someone help me how to import from this script the value of the user and make it available in Wappler?

Any other method from experienced user are always welcomes!

Thank you in advance

Roberto

No need to use it. Just API Action you will get what you want!!

1 Like

Hi Roberto,

I’m also interested in using OneSignal. Could you do a tutorial how you integrated it in Wappler?

That would be great :grinning:

Hi, unfortunately I left the project for the moment because I was involved in other projects. But I will resume it and in case I will write everything here.

If you have any experience, please share :slight_smile:

Hi,
Could you provide the way to do?
I need to add push notifications, and can’t succeed.

No solutions yet. Unfortunately. Because I had to left and do other things.
But still very interested …

I’m almost done :crossed_fingers: :pray:
I’ll post the way to add it these days.

1 Like