【发布时间】:2018-05-12 03:45:58
【问题描述】:
由于我正在从使用legacy header authentication 方法切换到JWT Token 方法,因此我使用了以下示例here。
但是,我收到以下错误:
Error calling Login: {
"errorCode": "PARTNER_AUTHENTICATION_FAILED",
"message": "The specified Integrator Key was not found or is disabled. An Integrator key was not specified."
}
下面是我的 C# 代码。
string oauthBasePath = "account-d.docusign.com";
string privateKeyFilename = "./private.pem";
int expiresInHours = 1;
ApiClient apiClient = new ApiClient(docuSignUrl);
apiClient.ConfigureJwtAuthorizationFlow(
"IntegratorKey",
"USER ID GUID",
oauthBasePath,
privateKeyFilename,
expiresInHours);
AuthenticationApi authApi = new AuthenticationApi(apiClient.Configuration);
return authApi.Login();
我发现 this thread 显示了类似的错误,但似乎没有解决
2018 年 5 月 7 日更新:我已验证帐户中使用的域,但仍然收到相同的错误消息
2018 年 5 月 11 日更新:当我使用我的代码但我替换了 DocuSign 单元测试here 中使用的 IntegratorKey、UserID 和私钥时,我的代码现在可以工作了!?因此,我只能得出结论,问题不是来自我的代码,而可能是 DocuSign 方面的配置问题?我需要以特定方式配置我的 Integrator Key 吗?
【问题讨论】:
-
你是 docuSignUrl - demo.docusign.net/restapi 的演示版吗?你可以在Unit Test查看测试
-
是的,这是我使用的网址:demo.docusign.net/restapi
-
[单元测试] (github.com/docusign/docusign-csharp-client/blob/master/test/…) 代码有帮助吗?您还可以重新检查是否使用 redirectUri 或 RSA 密钥对保存了集成商密钥更改。
-
不,它没有多大帮助。我已经用它来创建我的代码(见我的问题)。我不明白你的第二个问题,我认为它缺少单词。
-
能否请您尝试使用 jwt.io/ 网站生成 Assertion,然后使用 POSTMAN 生成访问令牌。它将确保在 DS 中配置 IntegratorKey 时不存在问题。
标签: c# docusignapi