Open URL in App

Overview

When sending push notifications, you can specify a URL to open within your app when the notification banner is tapped. To do this, include a field in the Additional Data section of your push notification request, either via the OneSignal portal or the REST API. Use the targetUrl field and specify the URL you want to open within your app.

561

Specify targetUrl to open a URL within your app when the notification is tapped

❗️

Launch URL ≠ targetUrl

OneSignal also offers a Launch URL field, which opens a URL in a popup browser window within your app when the notification is tapped. However, this popup does not support all in-app functionality, such as the Median JavaScript Bridge or internal/external link handling. For a full in-app experience, you should use the targetUrl field, which opens the URL directly within the app.

Learn more about opening URLs via push notifications in the OneSignal Documentation.