Ich versuche, den folgenden Code as mentioned here,DocuSign Der angegebene Integrator Key wurde nicht gefunden oder deaktiviert
public string loginApi(string usr, string pwd)
{
// we set the api client in global config when we configured the client
ApiClient apiClient = Configuration.Default.ApiClient;
string authHeader = "{\"Username\":\"" + usr + "\", \"Password\":\"" + pwd + "\", \"IntegratorKey\":\"" + INTEGRATOR_KEY + "\"}";
Configuration.Default.AddDefaultHeader("X-DocuSign-Authentication", authHeader);
// we will retrieve this from the login() results
string accountId = null;
// the authentication api uses the apiClient (and X-DocuSign-Authentication header) that are set in Configuration object
AuthenticationApi authApi = new AuthenticationApi();
LoginInformation loginInfo = authApi.Login();
// find the default account for this user
foreach (LoginAccount loginAcct in loginInfo.LoginAccounts)
{
if (loginAcct.IsDefault == "true")
{
accountId = loginAcct.AccountId;
break;
}
}
if (accountId == null)
{ // if no default found set to first account
accountId = loginInfo.LoginAccounts[0].AccountId;
}
return accountId;
}
Es funktioniert nicht, ich habe es mit einem Try-Catch gewickelt und diesen Fehler bemerkt,
Error calling Login: {
"errorCode": "PARTNER_AUTHENTICATION_FAILED",
"message": "The specified Integrator Key was not found or is disabled."
}
Als ich an dem Fiedler aussehen,
Die Anfrage geht an www.docusign.net, wo ich sie an https://demo.docusign.net
senden möchte. Wie kann ich den Base Uri für diesen Code ändern?
Ich hatte ein Authentifizierungsproblem selbst in der inoffiziellen .NET präsentieren zu setzen Nur Core NuGet-Paket; Die Instanziierung einer neuen Konfigurationsinstanz, wie Sie sie hervorgehoben haben, scheint sie jedoch gelöst zu haben. Danke: D – ne1410s