- Node.js 17 or higher
Get SDK code
git clone git@github.com:signnow/SignNowNodeSDK.gitInstall dependencies
npm installCopy .env.example to .env and fill your credentials in the required values
cp .env.example .envTo run tests you need to have a valid .env.test file with credentials for testing.
If you don't have it, you can create it by copying the .env.test.dist file and renaming it to .env.test.
However, the file will be created automatically if you just run test execution with the following commands:
npm run testTo start using the SDK, you need to create a new instance of the SDK API client and authenticate it using the credentials from the .env file.
Example of sending a request to get a document by id:
import { Sdk, DocumentGet } from '@signnow/api-sdk';
import type { Document } from '@signnow/api-sdk';
const sdk = await new Sdk().authenticate();
const client = sdk.getClient();
const documentGet = new DocumentGet('29db9956636d481f9c532ef64951ae78209f7483');
const responseDocumentGet = await client.send<Document>(documentGet);
console.log('response document get', responseDocumentGet);You can find more examples of API usage in the examples directory.