NodeJS 在docusign API中有任何方法可以为完成的信封生成链接吗?

uhry853o  于 2023-06-05  发布在  Node.js
关注(0)|答案(1)|浏览(207)

我们正在生成两个收件人视图一个为管理员和客户端-他们有独特的clientUserId为管理员其前缀为admin-现在当所有各方签署的信封是有可能生成一个新的链接视图这是客户端和管理员签名IM寻找类似的签名者视图链接的组合。它也可以嵌入..?
我试过通过getDocument使用合并,但这只返回一个文件,而不是可见的链接。

sycxhyv7

sycxhyv71#

是的,您可以使用与嵌入式签名相同的方式,针对特定收件人执行相同的API调用。
https://github.com/docusign/code-examples-node/blob/master/embeddedSigning.js
下面是获取URL的代码:

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;
}

相关问题