docusignapi - 发送信封时认证失败
问题描述
我正在开发一个基于模板发送信封的 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 管理面板中看到的匹配。
我该怎么做才能使这个请求生效?
谢谢。
解决方案
如果您收到“未指定集成商密钥”,则问题可能是 DocuSign 没有看到您的Authorization
标题,或者无法正确解释它。
在查看您的通话标题时,您似乎Authentication
在应该使用时使用不正确Authorization
推荐阅读
- python - 无法使用 tensorflow 1.15 保存通用 lite 的 tensorflow hub 模型
- apache-kafka - 无法运行 Kafka 控制台生产者 (NoSuchMethodError)
- sass - 当我尝试使用变量或混合时,使用“@use”规则将部分导入到主 sass 文件中会返回未定义的错误
- algorithm - 如何从表中选择特定值并避免重复?
- c - Tcp 和 udp 最大数据包大小
- json - 使用 jq json cli 以千位分隔符格式化数字
- c# - 如何在 VS2019 中启用编辑并继续?
- typescript - 检索 ng-select 的选定值 - Angular8
- javascript - 仅使用 Sublime Text 作为 IDE 时 Meteor 不刷新浏览器
- javascript - 使用 JavaScript 将 HTML div 排序到其对应的 div