• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Adobe Sign refresh token Issue - getting error The underlying connection was closed

New Here ,
Jan 21, 2025 Jan 21, 2025

Copy link to clipboard

Copied

Hello All,

 

I am using the developer account and trying to get access token using refresh token but getting underlying connection close error -

below is the code we are trying -

string requestURI = "https://secure.in1.adobesign.com/oauth/v2/refresh";
string refreshToken = refresh token;

var requestBody = new List<KeyValuePair<string, string>>()
{
new KeyValuePair<string, string>("client_id", Client id),
new KeyValuePair<string, string>("client_secret", client_secret),
new KeyValuePair<string, string>("grant_type", "refresh_token"),
new KeyValuePair<string, string>("refresh_token", refreshToken),
};
using (var httpClient = new HttpClient())
{
HttpContent requestContent = new FormUrlEncodedContent(requestBody);

httpClient.DefaultRequestHeaders.Clear();

var httpResponse = httpClient.PostAsync(requestURI, requestContent).Result;
var response = httpResponse.Content.ReadAsStringAsync().Result;
}

below is the error details -
System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult)
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.TlsStream.EndWrite(IAsyncResult asyncResult)
at System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult, TransportContext& context)
at System.Net.Http.HttpClientHandler.GetRequestStreamCallback(IAsyncResult ar)
--- End of inner exception stack trace ---

Any pointer will be really helpfull.
Thank you.


 

Views

37

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2025 Jan 22, 2025

Copy link to clipboard

Copied

LATEST

Please post this question to the Adobe Sign forum. https://community.adobe.com/t5/adobe-acrobat-sign/ct-p/ct-adobe-sign

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources