Browse our Products

If so you can download any of the below versions for testing. The product will function as normal except for an evaluation limitation. At the time of purchase we provide a license file via email that will allow the product to work in its full capacity. If you would also like an evaluation license to test without any restrictions for 30 days, please follow the directions provided here.


Product Docs Swagger Examples Blog Support Dashboard

Installation

The package is available at npmjs.com and it can be installed via npm by executing the following command:

npm install groupdocs-signature-cloud

NPM Version NPM Downloads NPM-GroupDocsCloud


Requirements

Dependencies

The SDK requires the following packages:

PackageConstraint
axios^1.21.1
form-data*
jsonwebtoken9.0.1
qs^6.17.1

Quick Start

Get your API credentials

To use GroupDocs.Signature Cloud, sign up at GroupDocs.Cloud Dashboard and get your Client ID and Client Secret.

Initialize the API

Use the following code to start using the GroupDocs.Signature Cloud SDK for Node.js.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const signApi = signature_cloud.SignApi.fromConfig(config);

See the full example in RunExamples.js.

Sign a document with text

Once initialized, use this basic example to add a text signature to a Word document.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const signApi = signature_cloud.SignApi.fromConfig(config);

(async () => {
    let fileInfo = new signature_cloud.FileInfo();
    fileInfo.filePath = "signaturedocs/one-page.docx";

    let opts = new signature_cloud.SignTextOptions();
    opts.signatureType = signature_cloud.OptionsBase.SignatureTypeEnum.Text;
    opts.text = "GroupDocs.Signature Cloud";
    opts.left = 100;
    opts.top = 100;
    opts.width = 100;
    opts.height = 100;
    opts.page = 1;

    let settings = new signature_cloud.SignSettings();
    settings.fileInfo = fileInfo;
    settings.options = [opts];
    settings.saveOptions = new signature_cloud.SaveOptions();
    settings.saveOptions.outputFilePath = "signaturedocs/signedText_one-page.docx";

    let request = new signature_cloud.CreateSignaturesRequest(settings);
    let response = await signApi.createSignatures(request);
    console.log("Expected response type is SignResult: DownloadUrl = " + response.downloadUrl);
})();

See the full example in TextSignature.js.

Sign a Document with an Image

This example places an image signature on the first page of a Word document.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const signApi = signature_cloud.SignApi.fromConfig(config);

(async () => {
    let fileInfo = new signature_cloud.FileInfo();
    fileInfo.filePath = "signaturedocs/one-page.docx";

    let opts = new signature_cloud.SignImageOptions();
    opts.signatureType = signature_cloud.OptionsBase.SignatureTypeEnum.Image;
    opts.imageFilePath = "signaturedocs/signature.jpg";
    opts.left = 100;
    opts.top = 100;
    opts.width = 200;
    opts.height = 100;
    opts.page = 1;

    let settings = new signature_cloud.SignSettings();
    settings.fileInfo = fileInfo;
    settings.options = [opts];
    settings.saveOptions = new signature_cloud.SaveOptions();
    settings.saveOptions.outputFilePath = "signaturedocs/signedImage_one-page.docx";

    let request = new signature_cloud.CreateSignaturesRequest(settings);
    let response = await signApi.createSignatures(request);
    console.log("Expected response type is SignResult: DownloadUrl = " + response.downloadUrl);
})();

See the full example in ImageSignature.js.

Search for a Barcode Signature

This example searches a signed document for barcode signatures.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const signApi = signature_cloud.SignApi.fromConfig(config);

(async () => {
    let fileInfo = new signature_cloud.FileInfo();
    fileInfo.filePath = "signaturedocs/signedBarcodeOne_page.docx";

    let opts = new signature_cloud.SearchBarcodeOptions();
    opts.signatureType = signature_cloud.OptionsBase.SignatureTypeEnum.Barcode;
    opts.matchType = signature_cloud.SearchBarcodeOptions.MatchTypeEnum.Contains;
    opts.allPages = true;

    let settings = new signature_cloud.SearchSettings();
    settings.fileInfo = fileInfo;
    settings.options = [opts];

    let request = new signature_cloud.SearchSignaturesRequest(settings);
    let response = await signApi.searchSignatures(request);
    console.log("Expected response type is SearchResult : Length = " + response.signatures.length);
})();

See the full example in SearchBarcode.js.

Verify a Text Signature

This example checks that a document contains the expected text signature.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const signApi = signature_cloud.SignApi.fromConfig(config);

(async () => {
    let fileInfo = new signature_cloud.FileInfo();
    fileInfo.filePath = "signaturedocs/signedText_one-page.docx";

    let opts = new signature_cloud.VerifyTextOptions();
    opts.signatureType = signature_cloud.OptionsBase.SignatureTypeEnum.Text;
    opts.text = "GroupDocs.Signature Cloud";
    opts.matchType = signature_cloud.VerifyBarcodeOptions.MatchTypeEnum.Contains;
    opts.page = 1;
    opts.allPages = true;

    let settings = new signature_cloud.VerifySettings();
    settings.fileInfo = fileInfo;
    settings.options = [opts];

    let request = new signature_cloud.VerifySignaturesRequest(settings);
    let response = await signApi.verifySignatures(request);
    console.log("Expected response type is VerifyResult : IsSuccess = " + response.isSuccess);
})();

See the full example in VerifyText.js.

Get Supported Signature Formats

Retrieve the document formats the API can sign.

"use strict";
const signature_cloud = require("groupdocs-signature-cloud");

const clientId = "YourClientId";
const clientSecret = "YourClientSecret";

const config = new signature_cloud.Configuration(clientId, clientSecret);
config.apiBaseUrl = "https://api.groupdocs.cloud";

const infoApi = signature_cloud.InfoApi.fromConfig(config);

(async () => {
    let response = await infoApi.getSupportedFileFormats();
    console.log("Formats count: " + response.formats.length);
})();

See the full example in GetSupportedFormats.js.

Examples on GitHub

The GroupDocs.Signature Cloud Node.js Examples repository includes ready-to-run examples covering:

CategoryExamples
SignText, image, barcode, QR code, digital, stamp, and collection signatures
Search and VerifySearch and verify barcode, QR code, digital, text, and collection signatures
Update and DeleteUpdate or delete barcode and QR code signatures
Basic UsageDocument information, preview, supported formats, barcodes, and QR codes

How to run the examples

  1. Clone or download the examples repository
  2. Edit Examples/RunExamples.js and set your clientId and clientSecret
  3. Go to the Examples directory
  4. Run npm install
  5. Run npm update
  6. Execute npm run-script start

For more details, visit Getting Started.


Product Docs Swagger Examples Blog Support Dashboard


Tags

eSignature API | Node.js Cloud API | GroupDocs.Signature Cloud | REST API | Digital Signature | Text Signature | Barcode Signature | QR-Code Signature | Document Signing | Signature Verification | Signature Search | Cloud Storage Integration | File Operations | Folder Operations | Secure API Access | PDF Signing | Word Document Signing | Image Signature | Stamp Signature | Cross-platform API | Document Security | Electronic Signature



 English