自 2018 年 5 月 31 日起,我在登录 DocuSign API 时收到以下错误。
DocuSign.eSign.Client.ApiException:“调用登录时出错:操作已超时”。
自去年以来,我们一直在测试 DocuSign API,并且与我们的内部集成应用程序一起运行良好。昨天是我们第一次在登录时收到此错误消息,但问题仍然存在。如果我通过演示 DocuSign 网站登录https://appdemo.docusign.com,我可以登录了。
但如果我通过 DocuSign API 尝试相同的操作,则会出现超时错误。
Configuration.ApiClient.Configuration.ApiClient.RestClient.BaseUrl
被设定为https://demo.docusign.net/restapi/
new System.Collections.Generic.Mscorlib_DictionaryDebugView<string, string>(Configuration.DefaultHeader).Items[0]
被设定为{[X-DocuSign-Authentication, {"Username":[username], "Password":[password], "IntegratorKey":[IntegratorKey]}]}
我们根本没有更改用户名、密码或 IntegratorKey。
的价值response.StatusCode
返回为 0。请在下面找到我的登录代码。
public ApiResponse< LoginInformation > LoginWithHttpInfo (AuthenticationApi.LoginOptions options = null)
{
var path_ = "/v2/login_information";
var pathParams = new Dictionary<String, String>();
var queryParams = new Dictionary<String, String>();
var headerParams = new Dictionary<String, String>(Configuration.DefaultHeader);
var formParams = new Dictionary<String, String>();
var fileParams = new Dictionary<String, FileParameter>();
Object postBody = null;
// to determine the Content-Type header
String[] httpContentTypes = new String[] {
};
String httpContentType = Configuration.ApiClient.SelectHeaderContentType(httpContentTypes);
// to determine the Accept header
String[] httpHeaderAccepts = new String[] {
"application/json"
};
String httpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAccept != null)
headerParams.Add("Accept", httpHeaderAccept);
// set "format" to json by default
// e.g. /pet/{petId}.{format} becomes /pet/{petId}.json
pathParams.Add("format", "json");
if (options != null)
{
if (options.apiPassword != null) queryParams.Add("api_password", Configuration.ApiClient.ParameterToString(options.apiPassword)); // query parameter
if (options.includeAccountIdGuid != null) queryParams.Add("include_account_id_guid", Configuration.ApiClient.ParameterToString(options.includeAccountIdGuid)); // query parameter
if (options.loginSettings != null) queryParams.Add("login_settings", Configuration.ApiClient.ParameterToString(options.loginSettings)); // query parameter
}
// make the HTTP request
IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_,
Method.GET, queryParams, postBody, headerParams, formParams, fileParams,
pathParams, httpContentType);
int statusCode = (int) response.StatusCode;
if (statusCode >= 400)
throw new ApiException (statusCode, "Error calling Login: " + response.Content, response.Content);
else if (statusCode == 0)
throw new ApiException (statusCode, "Error calling Login: " + response.ErrorMessage, response.ErrorMessage);
return new ApiResponse<LoginInformation>(statusCode,
response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
(LoginInformation) Configuration.ApiClient.Deserialize(response, typeof(LoginInformation)));
}