Add interactive action buttons to your push notifications on iOS, Android, and the web. Learn setup via Dashboard & API, supported platforms, click handling, icons, and event tracking.
Image showing action buttons in iOS
Image showing action buttons to be added for iOS and Android
buttons
parameter. Pass an array of up to 3 objects with id
, text
, and icon
.web_buttons
, passing up to 2 objects with id
, text
, icon
, and url
.id
propertytext
propertyhttp://site.com/icon.png
)icon
property'do_not_open'
to prevent opening any URL. (e.g. ‘do_not_open’)
url
propertyios_category
on the notification to associate actions via the UNNotificationCategory Object. See Apple’s Declaring Your Actionable Notification Types for more details._osp=do_not_open
magic string to prevent opening any URL. This is supported on Chrome and Firefox, but not supported for the Safari web browser.Platform | Buttons Supported | Notes |
---|---|---|
iOS | Up to 4 | Icons on iOS 15+. Requires categories for background handling. |
Android / Amazon / Huawei | Up to 3 | No button icons from Android 7+. |
Web – Chrome | Up to 2 | Buttons and icons supported. _osp=do_not_open supported. |
Web – Firefox | No buttons | _osp=do_not_open works for the launch URL only. |
Web – Safari | No buttons | _osp=do_not_open not supported. Provide a real URL. |
support@onesignal.com
Please include: