function makeRecipientViewRequest(args) {
// Data for this method
// args.dsReturnUrl
// args.signerEmail
// args.signerName
// args.signerClientId
// args.dsPingUrl
let viewRequest = new docusign.RecipientViewRequest();
// 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.
// The query parameter is included as an example of how
// to save/recover state information during the redirect to
// the DocuSign signing. It's usually better to use
// the session mechanism of your web framework. Query parameters
// can be changed/spoofed very easily.
viewRequest.returnUrl = args.dsReturnUrl + "?state=123";
// How has your app authenticated the user? In addition to your app's
// authentication, you can include authenticate steps from DocuSign.
// Eg, SMS authentication
viewRequest.authenticationMethod = "none";
// Recipient information must match embedded recipient info
// we used to create the envelope.
viewRequest.email = args.signerEmail;
viewRequest.userName = args.signerName;
viewRequest.clientUserId = args.signerClientId;
// DocuSign recommends that you redirect to DocuSign for the
// embedded signing. There are multiple ways to save state.
// To maintain your application's session, use the pingUrl
// parameter. It causes the DocuSign signing web page
// (not the DocuSign server) to send pings via AJAX to your
// app,
viewRequest.pingFrequency = 600; // seconds
// NOTE: The pings will only be sent if the pingUrl is an https address
viewRequest.pingUrl = args.dsPingUrl; // optional setting
return viewRequest;
}
1条答案
按热度按时间sycxhyv71#
是的,您可以使用与嵌入式签名相同的方式,针对特定收件人执行相同的API调用。
https://github.com/docusign/code-examples-node/blob/master/embeddedSigning.js
下面是获取URL的代码: