title: Send Notification to specific user using onesignal
body: <p>I'm using <a href="https://onesignal.com/" rel="nofollow noreferrer">onesignal</a> for first time in my project. I have to send notification to specific users (wherever user is logged in either on chrome or android device) on some events like whatsapp sends notification on mobile as well as website too and only if user is logged in. I have successfully sent notification to all users. After some R&amp;D on OneSignal, I come to know that I have to send notifications to specific playerId for this purpose. But here are some my questions/doubts.</p>
  
  <ul>
  <li>I think player Id is device id. If I'm right, what if current user logged out and another user gets logged in on same device. How can I come to know that I have not to send notification on this player Id as user is changed.</li>
  <li>Will be there multiple playerIds for single user? One for chrome, one for iOS device, one for Android etc?</li>
  <li>How I will get playerId of user to store in my database. Because I have to use <a href="https://documentation.onesignal.com/reference" rel="nofollow noreferrer">server rest API</a> to send notifications.</li>
  </ul>
  
  <p>If anyone can explain the points and also describe work flow to store playerid (when and how) in my database, it will be appreciated.</p>