在我从使用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端的配置问题?我需要以特定的方式配置我的集成商密钥吗?
发布于 2018-05-12 03:45:58
经过进一步调查,出现这样一个错误的原因是我没有在执行代码之前生成Authorization code Grant。根据找到的here信息,我必须执行以下HTTPRequest示例:
GET /oauth/auth?
response_type=token
&scope=signature
&client_id=YOUR_INTERGRATOR_KEY
&state=a39fh23hnf23
&redirect_uri=http://www.example.com/callback一旦它被批准,我就可以成功地运行我的代码。最后,最初的错误消息确实具有误导性(我可能会认为这是一个bug ?)。
https://stackoverflow.com/questions/48633928
复制相似问题