Suggest me meteor or node package for chrome notification that can work in desktop as well as mobile chrome

Package name for the meteor that can help to send notification in desktop as well as mobile chrome browser?

1 Like

I simply use the REST API of onesignal. Just get up to speed with that (free) service and you’ll find it works a treat.

@dthwaite Thanks…

Onesignal looks good.

when I allow from my web browser it is not adding the user to the dashboard.

What to do if I block the permission? I want to ask permission again.

Can you showcase some example with meteor.

Could you PLEASE give me some guidance on this. I’m ripping my hair out trying to get it setup.

I’m trying to test on localhost:3000 and keep getting cross domain issues. Even my production site won’t work, same cross domain issues.

var sendNotification = function(data) {
				url: "",
				headers: {
					'Authorization':'Basic fffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
					'Content-Type':'application/json; charset=utf-8'
				data: data,
				method: "POST",
			}).done(function( data ) {
				if ( console && console.log ) {
					console.log( "Sample of data:", data.slice( 0, 100 ) );

		var message = { 
		  app_id: "xxxxxxxxxxxxxxxxxxx",
		  contents: {"en": "English Message"},
		  include_player_ids: ["zzzzzzzzzzzzzzzzzz"]


Is ‘authorization’ : ‘Basic XXX’ is rest api key?

Yeah you get it from their console.

How did you load the manifest file?

I’ve not got too much time to go through my implementation in step by step detail but essentially I have this:

I include their script in my HTML head section:

<script src="" async></script>

I created an initialisation export as follows:

// Uses to provide web notifications
export const oneSignal=function() {
    if (Meteor.settings.public.onesignal) {
        var OneSignal = window.OneSignal || [];
        var settings = {
            'appId': Meteor.settings.public.onesignal.appId, // Get from OneSignal
            'notifyButton': {
                enable: false
            'welcomeNotification': {
                title: 'My System name',
                message: 'You\'re now set up for notifications',
            'safari_web_id': Meteor.settings.public.onesignal.webId, // Get from OneSignal
            'autoRegister': true
        OneSignal.push(['init', settings]);

I import and call this function once at start up:

Meteor.startup(function() {
    if (Meteor.isClient) {

I have a server method that stores a oneSignal user Id into my Meteor.users collection:

// Adds a OneSignal user id to be associated with the logged in user
export const oneSignalUserId=new ValidatedMethod({
    name: 'general.onesignal.userid',
    validate(userId) {
        check(userId, String);
    run(userId) {
        // Note that there's an id for every browser or device used
        Meteor.users.update(this.userId,{$addToSet: {oneSignalUserIds: userId}});

Which I would call early on from the client after authentication like so:

// If we have native messaging then make sure their userId is registered with the MMM database
if (window.OneSignal) {
    OneSignal.push(function() {
        OneSignal.getUserId(function(userId) {
            if (userId);

And here’s where I make a call to notify one or more users from my server:

var options = {
    headers: {
        Authorization: 'Basic ' + Meteor.settings.notifications.onesignal_apikey,
        'Content-Type': 'application/json; charset=utf-8'
    data: {
        'app_id': Meteor.settings.public.onesignal.appId,
        'contents': {en: message}, // My message
        'headings': {en: title}, // notification title
        'android_group': 'message',
        'include_player_ids': ids, // Array of oneSignal user Ids (from my Meteor.users table)
        'url': url // where to go if user clicks on notification
};'POST', Meteor.settings.notifications.url, options, function(error, result) {
    // Process the return for any ids that were not recognised to remove them from our database
    if (result && && && { => {
            Meteor.users.update({oneSignalUserIds: playerId}, {$pull: {oneSignalUserIds: playerId}});

In all the above you’ll notice that oneSignal keys, ids and urls etc are set up in my Meteor.Settings. Also note that I clean up my record of oneSignal user ids as per their advice.

Hope this helps. As with all these things, it’s a bit of a procedure and you have to read their documentation carefully.



I’ll work on this, and if there’s anything missing add to it. You rock. Thank you.

Their docs and customer service leave much to be desired, but hey, it’s complicated stuff. Thank you for your time.


It works. I will post a full code on my website about this.

I’ve got a very stripped down and basic simple to use version that will provide other users with the basics in the future. Thank you so much, your code confirmed and helped me get it running. Cheers from

Thanks @SkyRooms @dthwaite

http configuration worked
https didn’t work

In local machine its worked fine.

In production my landing page is with https with green lock signal.
when I lockedIn green locked signal disappeared. It is because of I am using some http link inside project.

So do i need to configure oneSignal as http type?

My site is full https or not?

OneSignal: Please check your manifest at https://mysite/manifest.json. The gcm_sender_id field is missing or invalid, and a valid value is required. Please see step 2 at

Hey, drop OneSignal right now, and move to

1 simple copy and paste code and you’re running. I had it working quickly. Free tier of 50k users.

But, the correct configuration is using Raix.

See my post here: OneSignal Custom Sounds

You can simply use node toast notifications. You don’t need anything more fancy thsn that.

$ npm install node-notifier --save

Use this on your node project file:
var notifier = require(‘node-notifier’);

title: ‘Testing’,
message: 'your message ',
sound: false

Thanks, @inspiraller.

I want browser notification.
One signal fulfilling my requirement but it does not work in https site, only working on HTTP site

is this what you are after: