I am building a NodeJS application in which I would like to integrate DocuSign API to get a PDF signed from the application. I tried the REST API as given in https://developers.docusign.com/esign-rest-api/code-examples/signing-from-your-app
The problem is, it needs login from browser to generate the access token. Is there a way to login admin account through code?
EDIT: I tried using API calls as mentioned in link using POST /accounts/{accountId}/envelopes
Header: {Authorization: 'Bearer '+docusign_credentials.token},
My request body is:
{
emailSubject: 'Please sign this document sent from Node SDK',
documents:
[{
documentBase64: '*base64code****',
name: 'TestFile.pdf',
extension: 'pdf',
documentId: '1' } ],
recipients: { signers: [ {
email: '[email protected]',
name: 'ss',
recipientId: '1',
clientUserId: '1001',
tabs: { signHereTabs: [Array] } } ] },
status: 'sent' }
}]
But, the result is
{ signers: [],
agents: [],
editors: [],
intermediaries: [],
carbonCopies: [],
certifiedDeliveries: [],
inPersonSigners: [],
seals: [],
recipientCount: '0' }
Is there a reason for missing signers in result?