title: Using OneSignal and I'm trying to save player id to javascript variable, API unclear
body: <p>I have a OneSignal account hooked up to a Cordova/iOS app. I need to save the player id in my own database so I can send push notifications to specific users when tasks are due or events are happening. </p>
  
  <p>I've looked at the API here: <a href="https://documentation.onesignal.com/reference#view-device" rel="noreferrer">https://documentation.onesignal.com/reference#view-device</a>
   but I don't know how to call a JavaScript function to save the identifier to a variable. There is no example of this.</p>
  
  <p>Any help would be much appreciated. </p>