Forum Documentation Showcase Pricing Learn more

Trying to get OneSignal Player ID from GoNative


#21

@tifanirose1611 I did not use that plugin, I don’t think it existed when I made it. The Javascript tutorial I put up above is just to store the player_id (the unique identifier for that user so I can send them push notifications).

To actually send the push notifications, I setup the API manually in the API Connector plugin by Bubble. It’s actually pretty easy. OneSignal docs here: https://documentation.onesignal.com/docs/onesignal-api

Here’s a screenshot to try to help you set that up, use it in conjunction with those docs:

Once that’s setup, you can use it as a workflow anywhere in your app.


#22

@jasondiehl07 Sorry for the really late response.

I only put it on every page so that I can capture that player_id no matter what page they are on. I don’t think it should ever change unless they change devices so it’s overkill to be safe. You could probably just put it on one page, whatever page they hit when they first login, and you’d be good.

I run it every time it doesn’t match because when they get a new phone it’ll update.

In my example, GoNative is triggering it and then I’m using the Javascript element to capture the data GoNative is sending - the player_id.