OneSignal: How to get UserId or Device Id so as to send notification to specific user

I am using OneSignal to send notification to specific users but I am unable to understand how to get UserId or DeviceId to send notifications . There was an entity called "Device" under OneSignalApi  which is also missing in the plugin. Can anyone help me with this?

Hi, 

You can simply get the user from the user table. send the ID of the selected user from the user table to "SendPushNotificationToUserId"

Thank You.

Hi ,

Thanks for your reply, what if I want to send it using DeviceId, then how should I proceed? How to get Device Id and and how to store it in the database?

Thanks

Shrushti

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.