Skip to content

This is a sample app to demonstrate the usage of the NodeJS client library from OneSignal to send and view notifications.

Notifications You must be signed in to change notification settings

OneSignalDevelopers/onesignal-node-sample

Repository files navigation

Quickstart   •   Website   •   Docs   •   Examples

OneSignal

OneSignal Node Sample

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.

🚦 Getting started

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.

Requirements

  • Node v18
  • OneSignal account and project.

Usage

From your terminal:

  1. Clone this project
  2. cd into the repository
  3. Install dependencies by running yarn
  4. Open the .env.local environment file
  5. Set ONESIGNAL_AUTH_KEY and ONESIGNAL_REST_API_KEY environment variables
  6. 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.

Support

Consider giving this repo a star ⭐️ if this project helped you.

❤️ Developer Community

For additional resources, please join the OneSignal Developer Community.

Get in touch with us or learn more about OneSignal through the channels below.

Ask a question about OneSignal

You can Ask a question 🙋‍♂️ about the OneSignal Node SDK and related topics in the onesignal-node-sdk repository.

Create a bug report

If you receive an error message or get blocked by an issue, please Create bug report 🪳.

About

This is a sample app to demonstrate the usage of the NodeJS client library from OneSignal to send and view notifications.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published