npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pdffiller-nodejs-api-client

v1.1.1

Published

PDFfiller API node.js client

Readme

pdffiller-nodejs-api-client (api-v2)

NPM

PDFfiller API You can sign up for the API here.

API Docs.

Requirements

  • Node.js >= v4 but the latest stable version of NodeJS is recommended;

Installation

npm i pdffiller-nodejs-api-client --save

Quick getting started steps

You can require PDFfiller module as a singleton and use it in anywhere your app, or require constructor and create different instances:

const PDFfiller = require('pdffiller-nodejs-api-client').PDFfiller;
  
// or
  
const PDFfillerConstructor = require('pdffiller-nodejs-api-client').PDFfillerConstructor;

Or using ES6:

import { PDFfiller, PDFFillerConstructor } from 'pdffiller-nodejs-api-client';

Authentication

Access tokens will automatically initialize when you’re successfully retrieved from the given user's credentials. The second parameter auto_update when you set up it as true token will automatically update when expire

PDFfiller.auth.authorize({
    grant_type: 'password',
    client_id: 'your_client_id',
    client_secret: 'your_client_secret',
    username: '[email protected]',
    password: 'your_password'
}, true)
    .then(accessTokenData => console.log(accessTokenData))
    .catch(err => console.error(err));

When your authorization has been completed successfully you can use client for retrieving, creating, updating or deleting information from your profile.

Also you can set up token, for future request:

PDFfiller.auth.setAccessToken('your_access_token');

and get current access token:

PDFfiller.auth.getAccessToken();

Usage

Use a method to retrieve a list of all applications:

PDFfiller.applications.all()
  .then(applications => console.log(applications))
  .catch(err => console.error(err));

Use a method to retrieve an applications by id:

PDFfiller.applications.get(application_id)
    .then(application => console.log(application))
    .catch(err => console.error(err));

Use a method to create an application:

PDFfiller.applications.create({
    name: 'app name',
    description: 'app description',
    domain: 'http://domain.com'
})
    .then(application => console.log(application))
    .catch(err => console.error(err));

Use a method to update an application by id:

PDFfiller.applications.update(application_id, {
    name: 'app name',
    description: 'app description',
    domain: 'http://domain.com'
})
    .then(application => console.log(application))
    .catch(err => console.error(err));

Use a method to delete an application by id:

PDFfiller.applications.remove(application_id)
    .then(result => console.log(result))
    .catch(err => console.error(err));

Use a method to get application users:

PDFfiller.applications.users(application_id)
    .then(users => console.log(users))
    .catch(err => console.error(err));

All examples with other endpoints are available in the docs folder.

Working with files

We send request using request-promise library, so to send a file you can just pass a file stream, for example:

const fs = require('fs');  
 
PDFfiller.templates.create({
   file: fs.createReadStream('./file.pdf'),
   name: 'test_file_load.pdf'
})
   .then(createdTemplateInfo => console.log(createdTemplateInfo))
   .catch(err => console.error(err));

When you download files we will return Buffer object after you can save it as in example:

const fs = require('fs');
 
PDFfiller.templates.download(template_id)
   .then(templateFileBuffer => {
       fs.writeFile('./your_file_name.pdf', templateFileBuffer, (err) => {
           if (err) {
               console.log(err);
               return;
           }
           console.log('successfully saved');
       });
   })
   .catch(err => console.error(err));

Callback support

Methods provide not only Promise api, you can use callbacks if you want. You can pass callback function to all methods as last argument, in this case methods dont return a Promise:

const fs = require('fs');
  
PDFfiller.templates.create({
    file: fs.createReadStream('./file.pdf'),
    name: 'test_file_load.pdf'
}, (err, response, body) => {
    if (err) {
        console.log(err);
    }
    // YOUR CODE
    }
);
PDFfiller.auth.authorize({
    grant_type: 'password',
    client_id: 'your_client_id',
    client_secret: 'your_client_secret',
    username: '[email protected]',
    password: 'your_password'
}, false, (err, body) => {
    if (err) {
        console.log(err);
    }
    // YOUR CODE
    }
);

Support

If you have any problems feel free to contact us:

  • On our issues page https://github.com/pdffiller/pdffiller-nodejs-api-client/issues
  • Via chat or phone at our tech site https://developers.pdffiller.com

License

This software is licensed under the following MIT license

Contributing

See CONTRIBUTING.

Author

API Team ([email protected])