The OneSignal PlayerID is a UUID (Unique Universal Identifier) that OneSignal gives all devices that use your mobile app or subscribe to your site.
The format is lowercase letters and numbers 8 characters-4 characters-4 characters-4 characters-12 characters
OneSignal makes a best effort to keep the same Player ID on all devices that are assigned. Some circumstances that may cause it to change:
Web Push - When the user clears their cookie data for your site.
Android - If the user has opted out of the Google Ad id, uninstalls the app and re-installs.
iOS - If the user does not have any other apps installed that have your IFV (Identifier For Vendor), then uninstalling your app and re-installing it, will give them a new Player ID.
The IFV is used to keep the ID the same after a full re-install, but only if the user has another one of your apps installed.
You can find your playerID by opening your app or site with the subscribed device. Then in All Users sort by "Last Active" so the arrow points up to see the latest active devices.
You may need to confirm it is your device by making the IP Address field visible. Click the "VISIBLE COLUMN LIST" filter at the top-right and checking IP Address to view the IP Address column.
You are not able to sort or filter devices by IP Address at this time.
If you know your IP Address or a specific tag, you need to get a CSV export of your devices and search them manually.
You can also find your playerId through the SDK by using one of our playerId methods in the console for your app or site.
For example, on Web:
1 Using the same browser you are subscribed to your site with, open the site URL with the OneSignal code active.
2 Open the Debugger console (F12 or Right Click the site > Inspect).
3 Click the "Console" section and add this code:
4 You will see your OneSignal player ID logged to the console if you are subscribed.
To manage multiple users that share a device, you will need to detect when User A is on the device and only send them their notifications when they are on the device, otherwise User B will get them.
One way to handle this is to tag the user when they sign in to the app, then you can target them by the tag and they will get the notification if the tag is set. Once they log out of the app, you can remove the tag.
So if User B is using the device, then they will get their own tag and will not get User A's notification.
So the users will only get the notifications when they are logged into the app.
The other option is to store on your server the Player IDs of the devices the user is currently logged in with, and then use our API to send notifications using the "include_player_ids" API targeting parameter.
Please see Internal Database & CRM
Each user that accesses your site or app from a different device or browser profile will get a new OneSignal Player ID.
You can ensure that you are targeting the same user across different devices by tagging the user with your own unique identifier or email and tying that to the different Player IDs that user may have.
Then use your Internal Database & CRM to keep track of Player IDs.
|Internal Database & CRM|