Silent push notification for web oneSignal

Viewed 401

Can I use silent web push notification using oneSignal? need to update some chunks of data without prompting the notification to user. I went through the documentation but couldn't find any useful data in it though. I am using Nest Js as BE and React Js as FE.

2 Answers

Based on the documentation I see from the API, you can edit the external user id data tags.

Now, using a silent web push notification, it won't do what you want because silent web push is still being shown.

https://developer.mozilla.org/en-US/docs/Web/API/Notification/silent

There is a userVisibleOnly setting that can be set to false which means you don't have to display a notification. However with Chrome when you try to disable this Chrome does not allow it. https://tests.peter.sh/push-message-generator/

Come join us in our discord server and learn more about our community: https://onesignal.com/onesignal-developers

Sorry for posting my answer late, I sent a message to the onesignal team on their website's Support chat option. This is the reply I get, latest of July 20th, 2021. May be in future, they may integrate this feature, but unfortunately not available now.

You cannot send notifications on web without displaying a notification to the user.

You can add additional Data to the notification and access that data in the notificationDisplay event.

Here is the docs on this: https://documentation.onesignal.com/docs/web-push-sdk#section-notification-display

Thanks

Ana From Onesignal (just for reference)

Related