当我正在从使用传统标头身份验证方法到智威汤逊令牌方法,我用了下面的例子发现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();
我已经发现这个线程显示类似的错误,但似乎没有解决
更新 05/07/2018:我已经验证了我的帐户中使用的域,但我仍然收到相同的错误消息
2018 年 5 月 11 日更新:当我使用我的代码但替换 DocuSign 单元测试中使用的 IntegratorKey、UserID 和私钥时here,我的代码现在可以运行了!?因此,我只能得出结论,问题不是来自我的代码,而可能是 DocuSign 端的配置问题?我需要以特定方式配置我的集成密钥吗?
经过更多调查,出现此类错误的原因是我在执行代码之前没有生成授权代码授予。
根据查到的信息here,我必须执行以下 HTTPRequest 示例:
GET /oauth/auth?
response_type=token
&scope=signature
&client_id=YOUR_INTERGRATOR_KEY
&state=a39fh23hnf23
&redirect_uri=http://www.example.com/callback
一旦获得批准,我就可以成功运行我的代码。
最后,最初的错误消息确实具有误导性(我可能认为它可以被视为一个错误?)。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)