The esign-api-js SDK is a JavaScript library that provides a convenient way to interact with Mekari eSign API. It simplifies the process of integrating eSign functionality into your JavaScript applications. With this SDK, you can easily create, manage, and sign documents using the eSign API.
To use the esign-api-js SDK, follow these steps:
npm install esign-api-js
const esignApi = require('esign-api-js');
const client = new esignApi({
clientId: 'YOUR_CLIENT',
clientSecret: 'YOUR_SECRET',
sandbox: true, #if you want to use sandbox environment, default value is false
});
const document = client.documents.createGlobalDocument({
doc: 'base64 encoded document',
filename: 'document.pdf',
signers: [
{
email: '[email protected]',
name: 'Foo Bar',
annotations: [
{
page: 1,
position_x: 100,
position_y: 100,
element_height: 50,
element_width: 200,
canvas_height: 500,
canvas_width: 500,
}
]
}
]
});
For detailed examples and additional information, please refer to the SDK documentation.