“ errorCode”:“ PARTNER_AUTHENTICATION_FAILED”; [英] "errorCode": "PARTNER_AUTHENTICATION_FAILED"

查看:89
本文介绍了“ errorCode”:“ PARTNER_AUTHENTICATION_FAILED”;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试与裸露的应用程序集成,但是在应用了集成密钥并确保我们的应用程序不仅查看了Demo API以及仪表板中的DEMO之后,我仍然遇到此错误。

I'm trying to integrate with a bare bones application but I keep running into this error after applying our integration key and making sure our application not only looked at the Demo API but as well was DEMO within the dashboard.

DocuSign.eSign.Client.ApiException: 'Error calling Login: {

  "errorCode": "PARTNER_AUTHENTICATION_FAILED",

  "message": "The specified Integrator Key was not found or is disabled. An Integrator key was not specified."

我验证了所有凭据与显示的完全相同,并且所有凭据都是正确的。如果我是正确的,apiclient是传递给演示的正确值。除了我需要输入的参数外,样本中的任何内容都没有改变。该应用程序正是该示例的用途:

I verified that all the credentials are exactly as displayed and all have been correct. The apiclient is the correct value to pass to the demo if I am correct. Nothing has been changed from the sample other then the parameters I need to throw in anyway. The application is exactly what the example is of:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DocuSign.eSign.Api;
using DocuSign.eSign.Model;
using DocuSign.eSign.Client;

namespace WebApplication4
{
    public partial class About : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            SendAPiCall();
        }
        public void SendAPiCall()
        {
            string username = "[*]";
            string password = "[*]";
            string integratorKey = "[*]";

            ApiClient apiClient = new ApiClient("https://demo.docusign.net/restapi");
            Configuration.Default.ApiClient = apiClient;

            var config = new Configuration(apiClient);
            var authApi = new AuthenticationApi(config);


            string authHeader = "{\"Username\":\"" + username + "\", \"Password\":\"" + password + "\", \"IntegratorKey\":\"" + integratorKey + "\"}";
            Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);

            // we will retrieve this from the login API call
            string accountId = null;

            /////////////////////////////////////////////////////////////////
            // STEP 1: LOGIN API        
            /////////////////////////////////////////////////////////////////

            // login call is available in the authentication api 
            LoginInformation loginInfo = authApi.Login();

            // parse the first account ID that is returned (user might belong to multiple accounts)
            accountId = loginInfo.LoginAccounts[0].AccountId;


推荐答案

尼克,

罪魁祸首是以下代码:

var authApi = new AuthenticationApi(config);

请不要指定配置。试试这个,它将解决您的错误:

Instead, don't specify the configuration. Try this, it will fix your error :

var authApi = new AuthenticationApi();

原因是您已经在代码中使用以下行指定了API配置:

The reason is that you already specified the API configuration in your code with the following line :

Configuration.Default.ApiClient = apiClient;

这篇关于“ errorCode”:“ PARTNER_AUTHENTICATION_FAILED”;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆