Windows app setup

Instructions for adding the OneSignal SDK to your Windows app

Requirements

Configure your OneSignal app and platform

Required

Before enabling push notifications, make sure your app is set up with the platforms you support— Apple (APNS), Google (FCM), Huawei (HMS), and/or Amazon (ADM). Follow the steps below to configure your OneSignal account and platform settings.

If your team already has a OneSignal account, ask to be invited as an admin role so you can configure the app. Otherwise, sign up for a free account to get started.

Details on configuring your OneSignal app (click to expand)

You can configure multiple platforms (iOS, Android, Huawei, Amazon) within a single OneSignal app.

1. Create or select your app

  • Select your app and go to Settings > Push & In-App to add platforms to an existing app.
  • Or create a new app by clicking New App/Website.
Example shows creating a new app.

Example shows creating a new app.

2. Set up and activate a platform

  • If creating an app, choose a recognizable app and organization name.
  • Select a platform to activate.
  • Click Next: Configure Your Platform.
Example setting up your first OneSignal app, org, and channel.

Example setting up your first OneSignal app, org, and channel.

3. Configure platform credentials

Follow the prompts based on your platforms:

Click Save & Continue after entering your credentials.

4. Choose target SDK

Select your app's target SDK and click Save & Continue.

Select which SDK you are using to be navigated to the docs.

Select which SDK you are using to be navigated to the docs.

5. Install SDK and save your App ID

You’ll be shown your OneSignal App ID — make sure to save it, as you’ll need it during SDK installation.

If needed, invite a teammate or developer by clicking Invite, then click Done.

Save your App ID for SDK setup and invite any more team members.

Save your App ID for SDK setup and invite any more team members.


Continue through the rest of our documentation to complete the integration.

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.