OneSignal Help & Documentation

Welcome to the OneSignal New IA developer hub. You'll find comprehensive guides and documentation to help you start working with OneSignal New IA as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Support

Sending Notifications

OneSignal Features - Sending Notifications

For Developers
For Marketers

New Message Page

Notifications can be sent via the New Message page on the dashboard.

Recipients

Selecting Users

There are three options to select which users receive your messages

Option
Description

Send to Everyone

Sends to all users.

Send by Segment

If you've set up User Segments, you can both include and exclude segments to send to.

Send to Test Users

Allows you to select which Test Users to send to. Useful when you're testing new notifications and what to see how they look on devices.

Message

Enter the message contents in this section.

Multiple Languages

The default notification title and contents are sent to:

  • All English users
  • All other users you do not specify a language-specific title and content for

You can click Add another language to add a language-specific title and content:

For example, to target Spanish, Turkish, and Finnish users:

  1. Fill in the default Title and Content. This is always required, and is sent to any users who are not Spanish, Turkish, or Finnish (e.g. English or other users).

  2. Click Add another language and select Spanish, Turkish, and Finnish. Supported Languages

  3. Fill in the Title and Content for each of your three new languages.

Options

Selecting Platforms

The Platforms & Options link expands to show you options to send notifications to specific platforms, and customize the presentation and features of those notifications. These features are explained by hovering over the question mark next to each option.

Platform / Option
Description

Send to iOS Subscribers?

Send to iOS devices.

Send to Android Subscribers?

Send to Android devices.

Send to Amazon Fire Subscribers?

Send to Amazon devices.

Send to Windows Phone 8.0 (MPNS) Subscribers?

Send to Windows Phone 8.0 devices.

Send to Windows Phone 8.1 (WNS) Subscribers?

Send to Windows Phone 8.1 devices.

Send to macOS Subscribers?

Send to macOS devices.

Send to Chrome App Subscribers?

Send to Chrome Apps & Extensions. This is not Web Push

Send to Chrome Web Subscribers?

Send to Chrome browsers (Web Push).

Send to Safari Web Subscribers?

Send to Safari browsers (Web Push).

Send to Firefox Web Subscribers?

Send to Firefox browsers (Web Push).

Include Additional Data?

Default is OFF

Custom key values pairs sent to your app when the notification is opened. See our SDK API documentation for details on how to read the data in your app.

Launch URL?

Default is OFF

Opens a web browser to the URL when the user taps on the notification.

Collapse Key/ID

Current notifications with the same id/key will be replaced instead of showing a whole new notification on the device.

Works on iOS, Android

Time To Live

Default is 259,200 seconds (3 days)

The notification will expire if the device remains offline for these number of seconds.

Affects iOS, Android, and Chrome Web Push.

Include Android / iOS Action Buttons?

Default is OFF

Buttons show on the notification itself. Works on iOS 8.0+, Android 4.1+, and ChromeApps using our official SDKs.

Include Chrome Web Push Action Buttons?

Default is OFF

Chrome 48+: Up to two actions buttons can be shown on a web push notification. Action button icons are only supported on Chrome 50+.

By default, all device platforms are enabled. You can choose whether to send your notification to individual platforms by toggling the switch next to the platform name:

This collapses the section and does not send to devices on selected platform. For example, iOS users will not receive notifications when the menu looks like this:

Selecting Options

Additional Data

Key : Value pairs that can be used to run some code inside your app or site when a notification is received or clicked. Same as the API data parameter.

Common example: Opening a URL inside your app's web view.

Pass a Key : Value pair "openURL" : "http://yoursite.com/blog-post" and in the notificationOpenedHandler of your SDK, you can access that value and send it to the part of your app that you want.
Often used with deep linking

Links

To send a link, find the Launch URL option and type in the link. Be sure to include the full URL including http:// or https://. This will open an external link when the notification is tapped. To learn more about links, including deep linking, take a look at our Links documentation

iOS - To have links open in an in-app browser, take a look at the key settings in the iOS Native SDK.

Collapse ID/Key

Adding a collapse_id parameter to a notification marks it to be removed from the device when another notification is sent with the same collapse ID.

For example, sending notification1 with a collapse_id = "collapse".

Then, send notification2 with the same collapse_id = "collapse".

If the user did not open notification1 yet, then notification2 will override and replace it.

Time To Live

The Time to Live or ttl parameter is an integer value in seconds that will shorten or lengthen the amount of time Google and Apple will "hold" the notification before they discard it.

If the user does not come online within the provided time, the notification will get deleted and will not show to the user.

The default time is 259,200 seconds (3 days) but can be any value from 0 to 2,419,200 seconds.

Scheduling

Clicking the Schedule item lets you select among different notification delivery scheduling options:

The OneSignal Dashboard detects timezone according to your Operating Systems time.

You can set a desired time to start sending a notification using the "Begin sending at a particular time" option. This will make all the notifications go out to your users at the desired time.

OneSignal also provides Per-User Optimizations to target users in specific ways.

Intelligent Delivery

Learn more in Intelligent Delivery.

Optimize by the user time zone

This will send the notification to each user at the time you specify but for the user's timezone.

If you are not sure exactly when a notification will be sent, we show you on the right-hand side under "SCHEDULE"

For example, if you chose the "Intelligent Delivery" option, it would look something like this:


FAQ

How do I send a notification to a single user?

For Developers

If you're looking to send notifications to a specific user device:

  1. Get the user's userId/playerId with the getIdsAvailable or getIds SDK method. See the SDK reference to find example code.

    For testing you can use the 'Player ID' shown in All Users (you can force kill your app and open it again to bring your device to the top of the list.)

  2. Send the userId from getIdsAvailable or getIds if the pushToken is not null or blank to your server.

  3. Set include_player_ids to the userId on the PostNotification SDK method or on the Create notification POST REST API call.

This method can be used for User-to-User notifications.

How long can notifications be?

The limit of how much content can be sent in a notification is based on the body, title, customURL or any custom data you add. This is roughly 3500 characters for both Android (GCM) and iOS (APNS).

For Web Push, the limit is between 100 and 190 characters, and the title is limited to 40 characters.

Sending Notifications

OneSignal Features - Sending Notifications

For Developers
For Marketers