Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fcmlly

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fcmlly

An integration for Google FCM and Node.js

  • 1.3.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by87.5%
Maintainers
1
Weekly downloads
 
Created
Source

Fcmlly - Integrate with Google cloud messaging easily

Best way to send your push notifications. Thanks to brentclouse for this gif I accept any contributes with open arms \./

Instalation


npm i fcmlly

Usage


const Fcmlly = require('fcmlly');
const fcmlly = new Fcmlly('YOUR_APIKEY_HERE'); // Get this key from Firebase console > Settings (page) > Cloud Messaging (tab) > Project credentials (section) > Server Key

Samples


const res = await fcmlly.pushToUser('user fcm token', 'youe title text', 'your body text');
console.log(res);

or

fcmlly.pushToUser('user fcm token', 'youe title text', 'your body text').then((res) => { console.log(res) }).catch((err) => { console.error(err) });



// sample console output:
// {
//  multicast_id: 76468637435051*****,
//  success: 1,
//  failure: 0,
//  canonical_ids: 0,
//  results: [ { message_id: '0:1603183795340265%a5e3d8a7a5e*****' } ]
// }

Methods


  • Push to a user .push('userId', 'title', 'body')

  • Push to all users in a topic .pushToTopic('topic name', 'title', 'body')

Keywords

FAQs

Package last updated on 20 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc