Sitemap
Giuliano Iacobelli

Giuliano Iacobelli

Co-Founder @Stamplay, Lego™ for APIs. Enabling people to unleash the power of APIs. A #500STRONG Software Engineer in love with web products. Hip Hop addicted.

Push Notifications Arrive At Stamplay With The New OneSignal API Integration

3 min readFeb 15, 2016

Communicating with users is traditionally done by email, however, sometimes it becomes necessary to reach out to users while they are actually using the app or on their desktop. This is where push notifications come in handy, allowing developers to relay information to the user. While useful, this kind of integration can be extremely tricky to setup. Luckily, Stamplay has a new API integration component which allows this kind of feature to be easily added in just a few minutes….OneSignal!

Overview
OneSignal is a complete push notification solution for apps and websites. After setup, your visitors can opt-in to receive desktop push notifications and can receive these notifications even after they’ve left your website/app. Using Stamplay, you can make push notifications occur in reaction to custom events as they happen.

Trigger & Action Setup
Select what event you want to be the trigger for the task, and then select what operation that you want the API component to perform as the action. The basic logic is “when this event (trigger) happens, then do this event (action).”

Press enter or click to view image in full size
Screen Shot 2016-02-15 at 11.36.26 AM

Action Data Configuration
For the Contents field, enter the message for the notification. In the Heading field, enter the heading you wish to appear in the notification. And for the URL field, enter the url of the site you wish to be available via the notification. You can make values dynamic by using the dropdown field to the right of each input field.

Press enter or click to view image in full size
Screen Shot 2016-02-15 at 11.38.24 AM

Add OneSignal SDK for HTTPS To Frontend Setup

Get Giuliano Iacobelli’s stories in your inbox

Join Medium for free to get updates from this writer.

Include all required OneSignal SDK files as instructed here.

Press enter or click to view image in full size
Screen Shot 2016-02-15 at 5.21.05 PM

Configure OneSignal Web Push
In your OneSignal account, go to App Settings. Then select Configure next to Google Chrome & Mozilla Firefox. Follow the directions and add your site url and Google server API key. Click Save and now it should have a status of Active.

Press enter or click to view image in full size
Screen Shot 2016-02-15 at 11.53.21 AM

View Notifications!
Activate the task using the API Console or frontend and view the push notification on your browser or desktop!

Press enter or click to view image in full size
Screen Shot 2016-02-15 at 5.11.51 PM

Use Cases

  • On user sign up, send welcome notification
  • On object create, send url link
  • On object create, tell user to check email

These are just a few examples of what you can do with the OneSignal API integration in your app. You can get started with the new OneSignal feature here. For questions regarding this integration, feel free to shoot us a tweet at @stamplay. Also, you can join our Stamplayers Slack channel for real-time updates and community support! Code strong!

--

--

Giuliano Iacobelli
Giuliano Iacobelli

Written by Giuliano Iacobelli

Co-Founder @Stamplay, Lego™ for APIs. Enabling people to unleash the power of APIs. A #500STRONG Software Engineer in love with web products. Hip Hop addicted.