OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Discussions

Player ID

Concepts - The OneSignal Player ID

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

When does the OneSignal Player ID change?

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.


Finding Player IDs

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.

Find Player ID by IP Address or Tag

If you know your IP Address or a specific tag, you need to get a CSV export of your devices and search them manually.

Please see our guide on exporting user data from the Dashboard or use the API CSV Export POST call.

Find Player ID by SDK

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: OneSignal.getUserId(function(id){console.log(id)});
4 You will see your OneSignal player ID logged to the console if you are subscribed.


Managing Multiple Users On One Device

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.

Method A: Tagging

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.

Method B: CRM or Database

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


Managing One User On Multiple Devices

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.

Please see Add Data Tags
OR
Email Syncing and Targeting

Then use your Internal Database & CRM to keep track of Player IDs.


Player ID


Concepts - The OneSignal Player ID

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.