We’re back with 12 Days of APIs! Today, we’re profiling One Signal’s push notification API with some help from co-founder and CEO George Deglin. Read on for more info or jump straight to the package page to start making calls!
The OneSignal API is all about push notifications. For the uninitiated, push notifications are short messages that pop up on a mobile device or desktop, even if the user is not logged into the app in question. For example, here’s what a push notification looks like on an iPhone.
Push notifications are pretty darn universal in this day and age. One Signal cites one study that reports that the average person receives 63.5 push notifications on mobile per day (and that was in 2014!).
If you’re building a web or mobile app, you’ll probably want push notification functionality. With the OneSignal API, you can add custom push notifications to the following devices:
Our favorite thing about the OneSignal API is that it’s 100% free.
There aren’t any limits on calls, notifications, devices or integrations. They also give you full access to push notification analytics so you can A/B test them.
So, how do they make money, you ask? Good question. They make money by offering custom solutions to enterprise customers and from aggregating and selling data.
Add push notifications to your app
George explained to us that the most common use cases for the API are adding customizable push notifications to your website, app or service. The API gives developers control over notification scheduling, personalization and design. You can A/B test design or different scheduled times so your notifications are optimized for best performance.
While OneSignal has some big name companies that use their API (like a little car rental company called Uber), George highlighted OneSignal’s integration with ProductHunt.
ProductHunt uses OneSignal’s API to send marketing notifications. For example, when a product receives comments, people in that thread are notified through the OneSignal API.
Link OneSignal to other services
Not all OneSignal’s use cases are user-facing, however. George also gave an example of developers using the OneSignal API to optimize their workflow. For example, the OneSignal API can be used to notify you when a blog post is published or if someone creates a pull request on your repo. Basically, if there’s anything you wish had a push notification, you can make one with OneSignal.
Ok, we’ve talked a lot about the OneSignal API. Here’s how you actually call it.
userKey
, appKey
and appId
from the OneSignal website. We made some GIFs below so that you could see where (note: we did not display the actual API keys for security purposes).You’ll find the userKey
and appKey
above your profile picture in the “Accounts & API keys” tab.
You can find the appId
from the “Keys & IDs” tab on the App Settings page of your app.
4. On the RapidAPI package page, pick your endpoint and fill in the parameters to make a call.
Once you’ve made a call successfully, you can export the code used to call the API into your script. Just pick your language of choice and copy the code directly into your app. If you’re calling multiple APIs, you can call them from a single RapidAPI endpoint. Go ahead and try it yourself here!
How much does it cost to use the OneSignal API? It’s 100% Free!
We couldn’t leave our interview with George without getting more insight into the OneSignal API–it’s got some pretty impressive stats. According to George, the OneSignal API…
That’s one heavy duty API. Our reaction was something like this…
George said that the API was written in Ruby and they focused on building scalability into the design. They’re full stack includes Ruby, Rails, Rspec, Coffeescript, PostgreSQL, and Redis.
See more: OneSignal Documentation
We’ve still got a few more days of our #12DaysOfAPIs profiles! Follow along on our blog, Facebook or Twitter (@Rapid_API) to make sure you don’t miss a single one. In the meantime, you can read our profiles on…
Whew! Let us know if you build anything cool in the comments below.
We're thrilled to announce the latest update to the Rapid Enterprise API Hub (version 2024.3)!…
Are you curious about what your API consumers are searching for? Is your Hub effectively…
The RapidAPI team is excited to announce the February 2024 update (version 2024.2) for the…
This January's release brings exciting features and improvements designed to empower you and your developers.…
Rapid API is committed to providing its users with the best possible experience, and the…
In today's fast-paced digital world, APIs (Application Programming Interfaces) have become the backbone of modern…