【问题标题】:How to use DocuSign API with React.js?如何在 React.js 中使用 DocuSign API?
【发布时间】:2020-09-24 23:39:21
【问题描述】:

我需要在 React.js 环境中对一些 DocuSign 电子签名功能进行 POC。对于初学者,我想使用这里提到的示例https://github.com/docusign/code-examples-node/tree/master/lib/eSignature。官方文档并没有说明如何在 React.js 代码仓库(从 create-react-app 导出)中使用这些。我也找不到一些相关的样本作为参考。如果有人能指导我如何在 React.js 环境中移植此 repo https://github.com/docusign/code-examples-node 中的示例,将不胜感激。

【问题讨论】:

  • 你能完成 POC 吗?正如我正在寻找的一样。
  • @AbdulMannan :我最终让我的服务器应用程序使用 Node.js SDK 并公开所需的 API 以供在前端使用。

标签: reactjs docusignapi


【解决方案1】:

对于 React.JS:

  1. 您可以从 React 应用程序直接调用 API。在这种情况下,您将不会使用 node.js SDK(它仅适用于 Node.js)。 API 调用是此处记录的创建信封调用:https://developers.docusign.com/esign-rest-api/reference/Envelopes/Envelopes/create/

您可以在此处查看 API 调用示例:https://github.com/docusign/code-examples-bash/blob/master/examples/eSignature/eg017SetTemplateTabValues.sh#L68

您还需要实现私有 CORS 网关。我们有一篇关于这样做的文章以及代码示例:https://www.docusign.com/blog/dsdev-building-single-page-applications-with-docusign-and-cors-part-2 2. 替代方案是让您的 React 应用程序要求您的服务器应用程序调用 DocuSign。您的服务器应用可以使用 Node.js SDK。

【讨论】:

    猜你喜欢
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 2021-03-22
    • 1970-01-01
    • 1970-01-01
    • 2014-09-28
    • 2017-10-21
    • 1970-01-01
    相关资源
    最近更新 更多