Windows app setup

Instructions for adding the OneSignal SDK to your Windows app

Requirements

Configure your OneSignal app and platform

If your team already created an account with OneSignal, ask to be invited as an admin role so you can setup the app. Otherwise, sign up for a free account at onesignal.com to get started!

Details on configuring your OneSignal app (click to expand)

You can setup multiple platforms (iOS, Android, Web, Email, SMS) within the same OneSignal App under Settings > Platforms. If you want to create a new app select New App/Website. If this is your first OneSignal app, you will see the next page.



Name your app and organization something recognizable, then select the platform to setup. You can always set up more platforms in this OneSignal App later within Settings > Platforms.

Click Next: Configure Your Platform.


To configure your app, follow the prompts based on the platforms you support.

After you setup your credentials, click Save & Continue.

Choose your Apps Target SDK, the click Save & Continue.


Finally, you will be directed to install the SDK and provided your OneSignal App ID. Make sure to save your App ID as you will need it later.

If you need a teammate or your developer to assist, you can click Invite them to the app and select Done when finished.


Continue through the documentation to finish adding OneSignal to your app.

Setup

OneSignal does not currently provide a dedicated UWP SDK, however, you can leverage our API to create and update device records within OneSignal and send push notifications.

Please refer to Microsoft's WNS documentation for more details on how Windows Push Notification Service works.

Once your app is within the Windows store, get the Microsoft App's "Package SID" and "Secret Key" (more details).

In your OneSignal app, navigate to Settings > Windows (UWP) platform and paste the Package SID and Secret Key and follow the prompts.

Register user

Follow Microsoft's docs on getting a notification channel. The channel URI is the token for OneSignal.

Call OneSignal's Create user API with subscription type of WindowsPush to represent the Windows WNS platform, and pass in the channel URI for the token parameter. You can include any other parameters within this endpoint. We recommend using the identity external_id property to identify the user's record.

Send messages

You can send push notifications using the OneSignal dashboard or Create notification API. More details, see Sending Push Messages.