UNPKG

boldsign

Version:

NodeJS client for boldsign

16 lines (14 loc) 509 B
import { DocumentApi } from '../api/documentApi'; const documentApi = new DocumentApi(); documentApi.setApiKey("YOUR_API_KEY"); var documentId = "YOUR_DOCUMENT_ID"; var onBehalfOf = "YOUR_BEHALF_EMAIL"; async function downloadDocument() { try { await documentApi.downloadDocument(documentId, onBehalfOf); console.log("Document downloaded successfully!"); } catch (error:any) { console.error("Error occurred while calling the API:", error.message); } } downloadDocument();