Skip to content

Instantly share code, notes, and snippets.

@DSDevCenter
Last active June 10, 2021 19:35
Show Gist options
  • Save DSDevCenter/11e805733fa9e3eb438bbb11175c608f to your computer and use it in GitHub Desktop.
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
// 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