node package manager
We need your input. Help make JavaScript better: Take the 2017 JavaScript Ecosystem survey »



A JavaScript library for managing Subscriptions in Livefyre's Personalized News Stream service.


This module is intended to work in both node.js and the browser (via browserify). Run make dist to put the browser bundle in dist/.

Use as a CLI (e.g. if you npm install -g livefyre-subscriptions):


livefyre-subscriptions --auth=$LFTOKEN
    "to": "",
    "type": "personalStream",
    "by": "",
    "createdAt": 1406886370

You can even pipe to something like jq:

livefyre-subscriptions --auth=$LFTOKEN | jq .[]


var subscriptions = require('livefyre-subscriptions');


The main export is an object.


Manage a user's subscriptions.

var subscriptions = require('livefyre-subscriptions');
var benSubscriptions = subscriptions.forUser({
    userId: 'ben',
    network: '',
    lftoken: 'optional. will use LFTOKEN env variable by default'
// or... 
var benSubscriptions = subscriptions.forUser('');

When you have a user's subscriptions, there are a few methods you can call that will perform operations using Livefyre's HTTP APIs. Each of these methods returns a promise.

Get subscriptions

benSubscriptions.get().then(function (data) {

Create a new subscription

var newSubscription = {
    to: '',
    type: 'personalStream'
    function (data) {
    function (e) {

make commands

  • make build - will npm install and bower install
  • make dist - will use r.js optimizer to compile the source, UMD wrap, and place that and source maps in dist/
  • make clean
  • make server - serve the repo over http
  • make deploy [env={*prod,uat,qa}] - Deploy to lfcdn, optionally specifying a bucket env