Understand how Users work in OneSignal, including user identification, OneSignal ID, External ID, and how subscriptions and user properties are managed across channels.
Property | Description |
---|---|
Channel | The Subscriptions the user has, such as Push, Email, or SMS. |
OneSignal ID | A UUID v4 auto-generated by OneSignal for each user. It may change upon assigning an External ID. |
Last session | The latest timestamp of app interaction. |
First session | When the user was initially created in OneSignal. |
Email from the most recent Email Subscription. | |
Phone | Phone number from the most recent SMS Subscription. |
IP Address | From the latest updated Subscription. |
External ID | A unique identifier you assign to unify the user with your system. |
Tags | Custom metadata (e.g. preferences, behavior). See Data Tags. |
Location | GPS coordinates of mobile subscriptions (if location tracking is enabled). See Location-Triggered Notifications. |
Timezone | timezone_id in IANA TZ format, set by the SDK. Can be updated via API. |
Language | User’s language in ISO 639-1 format. Can be updated via API or setLanguage . |
Aliases | Key-value pairs like mixpanel_id : 1234 . See Aliases. |
OneSignal.logout
OneSignal.login
, any existing OneSignal ID tied to the current Subscription is replaced by the one associated with that External ID. Subscriptions across platforms (Push, Email, SMS) will be merged under the same OneSignal ID if they share the same External ID.
OneSignal.login
will link the new Subscription back to the original user profile.
Subscriptions added via OneSignal.User.addEmail
or addSms
will inherit the current OneSignal ID.
SDK references:
Use the External ID to track the user across their subscriptions.
OneSignal.login
(frontend SDK)OneSignal.logout
(to remove)NA
, NULL
, 0
, -1
, all
, or 00000000-0000-0000-0000-000000000000
for External IDs.OSID1
OSID2
EIDA
: OSID1
EIDA
: Merged to OSID1
OneSignal.login
for reliable identification.login
.OneSignal.login
with a different External ID. This reassigns the OneSignal ID and Subscription to the new user.
To handle logout:
OneSignal.logout()
→ clears External ID and assigns anonymous OneSignal IDoptOut
, and re-enable with optIn
when logging back insetConsentRequired()
before initializing the SDK – this prevents auto-creation of a SubscriptionsetConsentGiven()
when ready to create a Subscription for the user