Moving a push notification system is not simply a matter of changing an API URL. A reliable migration must preserve the relationship between users, devices, subscription records, notification preferences, and application events while introducing a different delivery model.
HoneyNotify can make a OneSignal migration easier when the work is treated as an identity and rollout exercise rather than a one-off provider swap. The most important decisions are how existing device records will be mapped, how new tokens will be registered, how sends will be represented, and how both systems will be operated during the transition.
This guide presents a practical migration approach. It focuses on the areas that deserve engineering attention and highlights details that should be verified in the current OneSignal documentation before implementation.
Start with an inventory, not a rewrite
Before changing application code, document how the existing OneSignal integration works. The purpose is to separate provider-specific behaviour from business logic that should remain stable.
Record the following:
- Where device or subscription identifiers are stored
- How users are associated with subscriptions
- Which platforms are supported: iOS, Android, and Web Push
- How registration, logout, token refresh, and reinstallation are handled
- Which audiences are used, such as individual devices, users, tags, or segments
- Where notification payloads are assembled
- Which services trigger sends
- How delivery errors, retries, and duplicate requests are handled
- Which consent and preference rules must be enforced
Also identify every place that assumes a OneSignal-specific identifier or payload shape. A mobile client may hide some of this behind an SDK, while a backend may contain direct calls, stored subscription IDs, scheduled jobs, and operational scripts.
Create a migration map with four columns: current concept, HoneyNotify concept, conversion needed, and verification method. This turns an ambiguous migration into a list of testable changes.
Use a stable internal identity model
A push provider should not become the source of truth for your user model. Keep your own user ID, device record, platform, app or environment, permission state, and notification preferences in your data store. Provider identifiers should be associated with those records, not used as the primary business identity.
A useful internal device record can include:
- Your user ID, if the device is authenticated
- An internal device ID
- Platform and application environment
- The current provider token or registration identifier
- Registration and last-seen timestamps
- Permission and opt-out state
- A status showing whether the record is active, invalid, or awaiting verification
HoneyNotify targets can address a device, user, tag, segment, or all enabled devices. That gives you several ways to preserve existing audience behaviour, but the mapping should be deliberate. For example, a notification intended for one account should use a user target if your identity model supports that relationship. A device target is more appropriate when the business rule genuinely concerns one installation.
This distinction matters during migration. If all sends are rewritten as device-level operations, a user with several devices may receive an incomplete notification. If every send is changed to a broad user or segment target without checking preferences, users may receive messages on devices they disabled.
Plan the identifier transition carefully
Imported OneSignal subscription IDs can remain as device IDs when matching provider tokens later register. This can reduce the amount of immediate database reshaping required: an existing record can retain its known identifier while the new client integration establishes the matching token relationship.
That convenience is not a guarantee that every old record will match. Token rotation can prevent matching, as can registering the same installation under another provider environment. Reinstallations, restored application data, changed bundle or package configuration, and platform-specific registration differences can also create records that need reconciliation.
Treat matching as an observable process rather than an assumption. During the migration, record:
- Which existing records were imported
- Which registrations matched an existing device ID
- Which registrations created new device records
- Which users now have multiple active devices
- Which old records have not been seen within an agreed period
- Which tokens or registrations have become invalid
Do not automatically merge records solely because they share a user ID. A user may legitimately have several devices. Conversely, do not leave duplicate active records without a policy, because a single send may produce duplicate notifications.
Before production rollout, verify the identifier and environment rules in the current HoneyNotify and OneSignal documentation for your platforms. In particular, test development and production credentials separately rather than assuming that a token from one environment can match a record created in another.
Rework the client integration in stages
The client integration should cover device registration, identity, token lifecycle, payload handling, and lifecycle events across iOS, Android, and Web Push. Implement these concerns explicitly instead of only registering a token at first launch.
A robust client flow usually includes:
- Registering after the user has granted the required permission
- Associating the installation with your internal user identity when authentication is available
- Updating the registration when the platform reports a new token
- Removing or disassociating the device on logout according to your product rules
- Handling notification taps and custom payload data
- Recording relevant lifecycle events for troubleshooting
- Respecting opt-outs and platform permission changes
The exact SDK calls and lifecycle details must be taken from the current HoneyNotify documentation for each platform. Avoid copying assumptions from the previous provider: permission prompts, token timing, background execution, payload fields, and notification-open behaviour may differ.
Keep notification content provider-neutral where possible. Define an internal payload contract for your application, then translate it into the provider-specific request at the boundary. This makes future changes less disruptive and keeps product logic out of client delivery code.
Move server-side sends behind a controlled boundary
HoneyNotify server-side sends use POST /v1/notifications with a Bearer API key and an Idempotency-Key. A notification requires a title, body, and a target.
The safest implementation is a small notification service or adapter that owns this request. Product services should call that internal boundary with a business event and audience, rather than constructing provider requests throughout the codebase.
The adapter should be responsible for:
- Selecting a valid target
- Constructing the required title and body
- Adding the Bearer API key securely on the server
- Generating a meaningful Idempotency-Key for each logical send
- Applying timeouts and bounded retry behaviour
- Logging a correlation ID without exposing secrets
- Classifying validation, authentication, rate, and delivery-related failures
Idempotency deserves particular attention. A retry after a network timeout must not unintentionally create a second notification. The key should represent one logical send, remain stable across retries of that send, and not be reused for a different notification.
Never move the API key into a mobile or browser client. Sends should be initiated by trusted server-side code, where authorisation, user preferences, and sensitive payload decisions can be enforced.
Run a staged migration
A staged rollout lowers the risk of discovering identity problems only after all traffic has moved. Use a sequence that gives each layer a clear verification point.
- Export and protect the relevant OneSignal records and configuration
- Add HoneyNotify registration handling to a test build
- Import or associate existing identifiers according to the migration plan
- Test fresh installs, upgrades, reinstalls, logout, login, and token rotation
- Send controlled notifications to test devices on every supported platform
- Move a small internal or low-risk audience first
- Compare send requests, audience resolution, errors, and duplicate behaviour
- Expand the audience gradually
- Keep the old integration available until the agreed rollback window ends
The dual-running period needs clear ownership. Decide which provider is authoritative for each audience and event. Sending the same business event through both providers can cause duplicates, so dual operation should use controlled test cohorts or explicit deduplication rather than an unrestricted fan-out.
Common mistakes to avoid
Treating a subscription ID as a permanent device identity
Provider identifiers can outlive the token or environment they were associated with. Maintain token lifecycle handling and investigate unmatched registrations instead of assuming that an imported ID will always remain valid.
Migrating sends before migrating registration
A backend can appear healthy while notifications fail because the new provider has no current device registrations. Establish client registration and matching first, then move production sends.
Reproducing audiences without checking semantics
A OneSignal tag or segment may not have an identical meaning in another system. Define the audience rule in business terms, then decide whether a HoneyNotify user, tag, segment, device, or all-enabled-devices target is appropriate. Verify the other provider's current targeting behaviour before declaring the mapping complete.
Ignoring preferences and permissions
A technically valid target is not automatically a permitted target. Preserve consent, opt-out, quiet-hour, and account-level rules in your own system and apply them before sending.
Logging sensitive data indiscriminately
Notification payloads can contain personal or confidential information. Log request outcomes and correlation identifiers, but avoid storing full payloads or credentials unless there is a documented, protected operational need.
Measuring only API success
An accepted request does not prove that the right person received the right notification. Monitor registration health, target resolution, invalid registrations, duplicate reports, user-level notification outcomes, and application errors. Define these checks before rollout so the migration has an objective stop or rollback condition.
Questions to verify before switching off OneSignal
The migration is ready for decommissioning only when the answers are clear:
- Are all supported platforms registering current tokens through HoneyNotify?
- Can authenticated users be associated with the correct devices?
- Are token rotation and environment changes handled?
- Do device, user, tag, segment, and broad audience rules produce the intended recipients?
- Are retries protected by stable idempotency keys?
- Are notification preferences enforced consistently?
- Can the team identify and recover from an invalid registration?
- Is there a tested rollback or replay plan for important business events?
For any OneSignal-specific export, API, SDK, or targeting detail not covered by this article, check the provider's current documentation rather than relying on an older integration or migration script.
Conclusion
HoneyNotify makes a OneSignal migration easier when its capabilities are used as part of a disciplined transition: preserve your own identity model, map existing device records carefully, handle token lifecycle on every client, centralise server-side sends, and migrate audiences in controlled stages.
The largest risks are not usually the HTTP request or the notification title and body. They are stale identifiers, mismatched environments, duplicated devices, incorrect audience semantics, and sends that bypass consent rules. Test those areas explicitly, measure the migration as it progresses, and keep the provider boundary small enough to change safely.
