Skip to main content
Participant
September 25, 2020
Answered

Unable to connect to the remote server with Adobe sign API

  • September 25, 2020
  • 1 reply
  • 1066 views

Hello Team , we want to use Adobe Sign API with custom dotnet application Integration. We followed the Installation guide and entered the OAuth key in dotnet code . If we start Create Agreement process, we get an error "Unable to connect to the remote Server". Do you have any idea for the reason?

 

CreateAgreement(authorization, agreementInfo, xApiUser, xOnBehalfOfUser)

 

Kind regards

Gowthami

This topic has been closed for replies.
Correct answer Gowthami5E30

public Object CallApi(
String path, RestSharp.Method method, List<KeyValuePair<String, String>> queryParams, Object postBody,
Dictionary<String, String> headerParams, Dictionary<String, String> formParams,
Dictionary<String, FileParameter> fileParams, Dictionary<String, String> pathParams,
String contentType)
{
var request = PrepareRequest(
path, method, queryParams, postBody, headerParams, formParams, fileParams,
pathParams, contentType);

// set timeout

RestClient.Timeout = Configuration.Timeout;
// set user agent
RestClient.UserAgent = Configuration.UserAgent;
RestClient.Proxy = WebRequest.DefaultWebProxy;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
InterceptRequest(request);
var response = RestClient.Execute(request);
InterceptResponse(request, response);

return (Object) response;
}

1 reply

Gowthami5E30Correct answer
Participant
October 3, 2020

public Object CallApi(
String path, RestSharp.Method method, List<KeyValuePair<String, String>> queryParams, Object postBody,
Dictionary<String, String> headerParams, Dictionary<String, String> formParams,
Dictionary<String, FileParameter> fileParams, Dictionary<String, String> pathParams,
String contentType)
{
var request = PrepareRequest(
path, method, queryParams, postBody, headerParams, formParams, fileParams,
pathParams, contentType);

// set timeout

RestClient.Timeout = Configuration.Timeout;
// set user agent
RestClient.UserAgent = Configuration.UserAgent;
RestClient.Proxy = WebRequest.DefaultWebProxy;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
InterceptRequest(request);
var response = RestClient.Execute(request);
InterceptResponse(request, response);

return (Object) response;
}

Participant
October 3, 2020

Above code fixed the issue

Participant
November 30, 2021

Hello All,

 

I am facing similar issue while accessing  API ("Unable to connect to the Remote Server")

CreateTransientDocument(string authorization, Stream file, string xApiUser = null, string xOnBehalfOfUser = null, string fileName = null, string mimeType = null);

I am using AdobeSignCSharpSDK Rest API in C#.

 

What am I missing? 

Also how do I use the above code mentioned by @Gowthami5E30 

 

I am new to using REST API. Any help is appriciated.

 

Thank You

Sneha

'