OneSignal Push Notification Setup
Use OneSignal as your app's push provider: where to find the OneSignal App ID, what to configure in OneSignal, and what never to paste into WebAppStudio.
Overview
OneSignal is a push service with its own dashboard for segments, scheduling and automated messages. With OneSignal as provider, you enter one ID in WebAppStudio and manage everything else in OneSignal.
Set it up
- In OneSignal, create an app and configure its platforms:
- Android: the Firebase sender credentials OneSignal asks for.
- iOS: an APNs key from your Apple Developer account.
- Copy your OneSignal App ID: OneSignal dashboard › Settings › Keys & IDs. It looks like
00000000-0000-0000-0000-000000000000. - In WebAppStudio, open Integrations › Push notifications, turn on Enable Push Notifications and choose OneSignal.
- Paste the OneSignal App ID.
- Set the permission prompt, choose Save push settings and start a new build.
Enter only the App ID. Never paste your OneSignal REST API key into WebAppStudio or your website: it can send notifications to all your users.
Sending messages
Send from the OneSignal dashboard or API. To open a page when the notification is tapped, set the message's Launch URL to a page of your website, or add a url data field. See Notification links.
Switching providers
The provider is built into your app, so changing between Firebase and OneSignal needs a new build. Users of older builds keep the previous provider until they update.