2017-10-02 1 views
0

베어 본 어플리케이션과 통합하려고하지만 통합 키를 적용하고 응용 프로그램이 데모 API를 보았을뿐만 아니라 DEMO를 확인한 후에도이 오류가 계속 발생합니다 대시 보드 내에서."errorCode": "PARTNER_AUTHENTICATION_FAILED"

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는 내가 맞으면 데모에 전달할 올바른 값입니다. 아무리해도 던져 넣어야하는 매개 변수 이외의 샘플은 변경되지 않았습니다. 구성을 지정하지 않은,

var authApi = new AuthenticationApi(config); 

대신 :

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; 

답변

1

닉,

범인은 다음과 같은 코드 : 응용 프로그램은 예입니다 정확히입니다.

Configuration.Default.ApiClient = apiClient; 
:

var authApi = new AuthenticationApi(); 

이유는 이미 다음 줄에 코드에서 API 구성을 지정한다는 것입니다 :이 시도, 그것은 당신의 오류를 수정합니다

관련 문제