首页 > 解决方案 > 发送信封时认证失败

问题描述

我正在开发一个基于模板发送信封的 DocuSign 实现。为此,我必须手动编写我的请求,因为我们的框架与提供的 Java SDK 不兼容。不幸的是,我在实际尝试发送信封时遇到了错误。

我们的应用程序模拟另一个用户,因为它将在服务器上运行,整个身份验证流程似乎工作(我让它工作到我有一个用于 API 的 JWT)

为了创建一个新信封,我使用以下请求正文:

POST /v2.1/accounts/<accountId>/envelopes/ HTTP/1.1
Host: https://demo.docusign.net/restapi
Authentication: Bearer eyJ0e.....
Content-Type: application/json

{
  "recipients": {
    "signers": [
      {
        "email": "user@example.com",
        "name": "John Doe",
        "roleName": "Representative 1",
        "tabs": {
          "textTabs": [
            {
              "tabLabel": "testLabel",
              "value": "this is a pre-filled label"
            }
          ]
        }
      }
    ]
  },
  "status": "created",
  "templateId": "ba0ddc8e-648e-41f7-b4e5-56abf0073c8a"
}

我认为这个请求是有效的,并且符合我在文档中找到的内容。但是,发送后,我收到以下回复:

{
    "errorCode": "PARTNER_AUTHENTICATION_FAILED",
    "message": "The specified Integrator Key was not found or is disabled. An Integrator key was not specified."
}

这让我相信我使用了不正确的集成商密钥,但我进行了三次检查,并且我使用的集成商密钥与我在 DocuSign 管理面板中看到的匹配。

我该怎么做才能使这个请求生效?

谢谢。

标签: docusignapi

解决方案


如果您收到“未指定集成商密钥”,则问题可能是 DocuSign 没有看到您的Authorization标题,或者无法正确解释它。

在查看您的通话标题时,您似乎Authentication在应该使用时使用不正确Authorization


推荐阅读