If just there were a way to send push notifications to Customers without the need to create your own app. Enter Pushify.net - an easy to setup solution for exactly this issue.
The web app and mobile app is not in the same repository. This is the repository for the Web App and Backend API, and simonmaribo/pushify-app is the repository for the React Native Mobile App.
- Sign up to Pushify.net
- Create a channel and receive a Subscription Code.
- Let your users download the Pushify Notififications app on App Store or Google Play Store (soon)
- Give the user the Subscription Code and let them subscribe to the channel.
- Send notifications when something happens in your app.
If using NodeJS
, then just install our @pushify/js
library.
npm install @pushify/js
import { Pushify } from '@pushify/js'
const pushify = new Pushify({
key: '[API_KEY]'
})
function sendMessage(){
await pushify.send({
channel: '[CHANNEL_ID]',
title: '[TITLE]',
body: '[MESSAGE]',
// This is optional, and will open the link when the notification is clicked
url: "https://example.com"
})
}
You can send to multiple channels if passing channels
as string[]
instead of channel
.
async function sendMessage(){
await fetch(`https://api.pushify.net/v1/send`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer [API_KEY]`
},
body: JSON.stringify({
channel: '[CHANNEL_ID]',
title: '[TITLE]',
body: '[MESSAGE]',
// This is optional, and will open the link when the notification is clicked
url: "https://example.com"
}),
})
}
- Batching of Push Notifications
- Delete Channels
- Delete Messages on Phone (Mark as Read)
- API endpoints to create/delete/update channels