OneSignal makes engaging customers simple and is the fastest, most reliable service to send push notifications, in-app messages, SMS, and emails.
This project demonstrates integrating the OneSignal Node SDK. You can use this project as a boilerplate or reference to start your project.
This project assumes that you already have a OneSignal app created with push notifications setup. If you don't yet have a OneSignal app, create one first.
- Node v18
- OneSignal account and project.
From your terminal:
- Clone this project
cd
into the repository- Install dependencies by running
yarn
- Open the
.env.local
environment file - Set
ONESIGNAL_AUTH_KEY
andONESIGNAL_REST_API_KEY
environment variables - Run a command e.g.,
./bin/dev app list
For additional command help, run .bin/dev --help
╰─$ ./bin/dev --help
Sample project demonstrating how to use OneSignal's Node backend SDK
VERSION
onesignal-node-sample/0.0.0 darwin-arm64 node-v18.16.0
USAGE
$ onesignal-node-sample [COMMAND]
TOPICS
app Create a new OneSignal app.
notification Send a message to a user or segment.
plugins List installed plugins.
user Create a new user.
COMMANDS
help Display help for onesignal-node-sample.
plugins List installed plugins.
Consider giving this repo a star ⭐️ if this project helped you.
For additional resources, please join the OneSignal Developer Community.
Get in touch with us or learn more about OneSignal through the channels below.
- Follow us on Twitter to never miss any updates from the OneSignal team, ecosystem & community
- Join us on Discord to be a part of the OneSignal Developers community, showcase your work and connect with other OneSignal developers
- Read the OneSignal Blog for the latest announcements, tutorials, in-depth articles & more.
- Subscribe to us on YouTube for walkthroughs, courses, talks, workshops & more.
- Follow us on Twitch for live streams, office hours, support & more.
You can Ask a question 🙋♂️ about the OneSignal Node SDK and related topics in the onesignal-node-sdk repository.
If you receive an error message or get blocked by an issue, please Create bug report 🪳.