简体   繁体   中英

DocuSign signing from app

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: 'ss@gmail.com',
                      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?

Login from browser for Service Integration (using JWT) is required if you are using User Consent , and it is required only once. If you want to avoid this User Consent , then you can use Admin Consent , but for that you need to claim your user's email domain in DocuSign and the emaildomain of the user should be the one which your Organization owns, it should not be @gmail.com or @yahoo.com etc as you will not be able to modify DNS entries for the email domains which you do not own. If you want to proceed with this Admin Consent approach then you need to check with your DocuSign Account Manager for the pricing/plans.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM