Last active
June 10, 2021 19:35
-
-
Save DSDevCenter/11e805733fa9e3eb438bbb11175c608f to your computer and use it in GitHub Desktop.
DocuSign NODE SDK Create Recipient View Example (Embedded Signing) for eSignature REST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// instantiate a new EnvelopesApi object | |
var envelopesApi = new docusign.EnvelopesApi(); | |
// set the url where you want the recipient to go once they are done signing | |
// should typically be a callback route somewhere in your app | |
var viewRequest = new docusign.RecipientViewRequest(); | |
viewRequest.returnUrl = 'https://www.docusign.com/'; | |
viewRequest.authenticationMethod = 'email'; | |
// recipient information must match embedded recipient info we provided in step #2 | |
viewRequest.email = '{USER_EMAIL}'; | |
viewRequest.userName = '{USER_NAME}'; | |
viewRequest.recipientId = '1'; | |
viewRequest.clientUserId = '1001'; | |
// call the CreateRecipientView API | |
envelopesApi.createRecipientView(accountId, envelopeId, {'recipientViewRequest': viewRequest}, function (error, recipientView, response) { | |
if (error) { | |
console.log('Error: ' + error); | |
return; | |
} | |
if (recipientView) { | |
console.log('ViewUrl: ' + JSON.stringify(recipientView)); | |
} | |
return JSON.stringify(recipientView); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment