@idfy/sdk
Version:
Node.js SDK for Idfy REST API
49 lines (35 loc) • 1.68 kB
Markdown
[](https://travis-ci.com/idfy-io/idfy-sdk-node)
[](https://www.npmjs.com/package/@idfy/sdk)
A Node.js SDK for simple integration with the Idfy REST API.
npm install @idfy/sdk --save
- [Idfy REST API Reference](https://developer.signicat.com/express/apis/overview.html)
- [Idfy Developer Documentation](https://developer.signicat.com/express/docs/)
All methods return a [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise) that resolves with the response body returned from the API.
The example below shows how to get the details of a single document.
```javascript
const { IdfyClient } = require('@idfy/sdk');
// Initialize client with your credentials and desired scopes
const client = new IdfyClient(
'clientId',
'clientSecret',
['document_read', 'document_write']
);
// Make a call to retrieve the document
client.signature.getDocument('documentId')
.then((document) => {
console.log(`Retrieved document: ${document.title}`);
});
```
The Idfy SDK comes with built-in typings.
```javascript
import { IdfyClient } from '@idfy/sdk';
const client: IdfyClient = new IdfyClient(/* ... /*);
```
## Support
- Open an [issue](https://github.com/idfy-io/idfy-sdk-node/issues) to report bugs or submit feature requests.
- For other support requests, visit our [support page](https://www.signicat.com/en/contact#support) or contact us at [support@signicat.com](mailto:support@signicat.com).