#docusignapi frequent event=ttl_expired 使用内联签名时

#docusignapi frequent event=ttl_expired when using inline signing

使用 docusign 内联签名 api 时,我经常收到 event=ttl_expired。我什至尝试使用 Docusign API 资源管理器,同样的事情发生了。对于我获得的三个 URL 中的每两个,我都会收到 ttl_expired 错误。我检查了 DocuSign getRecipientView ttl_expired error 中给出的可能原因,但无济于事。

这里有我遗漏的东西吗?

截断的样本 json 如下。我已经替换了邮件 ID 和名称字段。

 {
      signers: [{
                    name: 'Name',
                    email: 'mail@example.com',
                    text_tabs: [
                        {
                            label: 'Name Field',
                            anchor_string: 'Name:',
                            anchor_x_offset: '100',
                            anchor_y_offset: '-10',
                            document_id: '1',
                            page_number: '10',
                            required: true,
                            width: 200,
                            height: 10
                        }
                    ],
                    sign_here_tabs: [
                        {
                            label: 'Signature',
                            anchor_string: 'Signature',
                            anchor_x_offset: '100',
                            anchor_y_offset: '-20',
                            document_id: '1',
                            page_number: '10',
                        }
                    ],
                    routing_order: 1,
                    embedded: true,
                    role_name: 'FirstRole',
                    clientUserId: 1
                },
                {
                    name: 'Another Name',
                    email: 'Anothermail@example.com',
                    sign_here_tabs: [
                        {
                            anchor_string: 'COMPANY:',
                            anchor_x_offset: '-20',
                            anchor_y_offset: '-20'
                        }
                    ],
                    routing_order: 2,
                    embedded: false,
                    role_name: 'SecondRole'
                }],
      status: 'sent',
      return_url: 'http://www.google.com',
      email_subject: 'Agreement from Document',
      email_body: 'Please sign the Agreement',
      files: [
          {
              path: File.join('/', 'docusign_docs', 'Agreement.pdf'),
              name: 'Agreement.pdf'
          }
      ]
  }

1) 根据您引用的另一篇文章,返回的 URL 必须在 300 秒内 opened/used

2) 这些仅供一次性使用 URL。如果您尝试再次使用相同的 URL,它会自动将您重定向到着陆页 w/ttl_expired 事件。

您的设计模式必须是在将人员重定向到签名 url 之前立即向 DocuSign 请求签名 url。别的都不靠谱

如果您需要更持久的 url 用于签名仪式,请使用您自己的 url,用于您自己的应用程序。当用户点击那个 url 时,您的应用程序应该:

  1. 验证 url
  2. 从 DocuSign
  3. 获得签名 url
  4. 将用户重定向到签名 url