laravel-notification-channels / onesignal

OneSignal notifications channel for Laravel
MIT License
283 stars 119 forks source link

How can I retrieve the OneSignal notification ID? #35

Closed haoxi911 closed 6 years ago

haoxi911 commented 6 years ago

I am implementing a feature to track if user opened the notifications. So I will need to save the UDID of each OneSignal notification to database.

However, the UDID in notifications table can't be matched with notification UDIDs in OneSignal dashboard.

Any ideas to resolve this :)

AshPowell commented 6 years ago

The id in the notifications table can be used to track if it has been opened or not... It seems to work fine here.

See https://documentation.onesignal.com/reference#track-open

curl --include \ --request PUT \ --header "Content-Type: application/json" \ --data-binary "{\"opened\":true, \"app_id\":"YOUR APP ID"}" \ https://onesignal.com/api/v1/notifications/{notificationId}

haoxi911 commented 6 years ago

Thanks @AshPowell, I will double check.