Skip to content

The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.

License

Notifications You must be signed in to change notification settings

RomanBachaloSigmaSoftware/docusign-esign-node-client

 
 

Repository files navigation

The Official DocuSign eSignature Node Client SDK

NPM version NPM downloads Build status Coverage Status

NPM module that wraps the DocuSign API

Documentation about the DocuSign API

Documentation about this package

Requirements

Compatibility

  • Node version 14.15.5 or higher

Installation

This SDK is provided as open source, which enables you to customize its functionality to suit your particular use case. To do so, download or clone the repository. If the SDK’s given functionality meets your integration needs, or if you’re working through our code examples from the DocuSign Developer Center, you merely need to install it by following the instructions below.

NPM:

  1. Open your preferred command-line console, then navigate to your project.
  2. In the console, type the following commands:
    npm install docusign-esign -save

Dependencies

This client has the following external dependencies:

Minimum:

  • DocuSign-eSign
  • Superagent 3.8.2

Optional:

  • Async v2.6.2
  • Jsonwebtoken v8.2.0
  • Passport-oauth2
  • Path

Code examples

You can find on our GitHub a self-executing package of code examples for the eSignature C# SDK, called a Launcher, that demonstrates common use cases. You can also download a version preconfigured for your DocuSign developer account from Quickstart. These examples can use either the Authorization Code Grant or JSON Web Token (JWT) authentication workflows.

OAuth implementations

For details regarding which type of OAuth grant will work best for your DocuSign integration, see Choose OAuth Type in the DocuSign Developer Center.

For security purposes, DocuSign recommends using the Authorization Code Grant flow.

Tests

Test configuration

  1. Login with your DocuSign account on https://appdemo.docusign.com.
  2. Open Apps and Keys section in Settings and press Add App and Integration Key button.
  3. Enter App name, add secret key, generate RSA key and press Save button.
  4. Create new brand on https://admindemo.docusign.com/brands page and save its ID.
  5. Create new template on https://appdemo.docusign.com/templates page and save its ID.
  6. Create .env.example file copy with .env name and fill it with required data from steps 3-5.
  7. Write your generated private key to test\keys\docusign_private_key.txt file.

Note: private key must be written to a file in the following format

-----BEGIN RSA PRIVATE KEY-----
MIICXAIBAAKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzW.....
-----END RSA PRIVATE KEY-----

Recomended operating system

The operating system to run unit-tests is Microsoft Windows 10.

Installing Node.js

To run tests for this project, please, install Node.js version 14.15.5 or higher.

After downloading process is complete, you will need to open the installer and press the "Install" button.

Make sure the installation is successful before moving on to next steps.

Test running

Install all the project dependencies by running the following command:

$ npm install

In order to run tests you will require the mocha test framework. Make sure it is installed and if not, install it by running the following command:

$ npm install --save-dev mocha 

You can now run tests from Mocha Test Explorer Extension or by using npm command in terminal:

$ npm run test 

If you are running the tests for the first time, you may need to grant permission to the application to make API calls. You can do this by opening OAuth authorization URL from the terminal output and pressing Accept button.

Support

Log issues against this client through GitHub. We also have an active developer community on Stack Overflow.

License

The DocuSign eSignature Node Client SDK is licensed under the MIT License.

Additional resources

About

The Official DocuSign Node.js Client Library used to interact with the eSign REST API. Send, sign, and approve documents using this client.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%