我正在研究一个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管理面板中可以看到的匹配。
该如何处理此请求?
谢谢。
答案 0 :(得分:1)
如果您收到“未指定集成商密钥”,则可能是DocuSign没有看到您的Authorization
标头,或者无法正确解释它的问题。
查看通话标题时,您应该使用Authentication
时似乎错误地使用了Authorization