Reputation: 31
I need to send web push notification for single user (may be player in case of one signal) using create notification API? in one signal. I have gone through the documentation, it is stating that we can send push notifications to segment or group but not to single user.
Upvotes: 3
Views: 1743
Reputation: 5522
You can get the userId by doing this: OneSignal.getUserId()
To learn more about the getUserId(): https://documentation.onesignal.com/docs/web-push-sdk#user-ids
To learn more about sending push notifications to specific users, please refer to: https://documentation.onesignal.com/reference/create-notification#send-to-specific-devices
Upvotes: 0