Highlighted

Getting new Access Token with Refresh Token

New Here ,
Sep 03, 2018

Copy link to clipboard

Copied

HI all,

I am trying to integrate the API to my application. I got my access token however it expired after 1 hour and now am trying to use my refresh token to get a new access token. I am using restsharp to post my requests.  Below is my code

     public void refreshToken()

      {

         ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

         var client = new RestClient("https://api.au1.echosign.com/oauth/token");

         var request = new RestRequest(Method.POST);        

         request.AddHeader("content-type", "application/x-www-form-urlencoded");

         request.AddParameter("refresh_token", "my refresh token here");

         request.AddParameter("grant_type", "refresh_token");

         request.AddParameter("client_id", "CBJCHBCAABAAl8PzbSLzHEHbHdUY2UQ0un4S2WmUdJ_W");

         request.AddParameter("client_secret", "my client secret here");

       

        IRestResponse response = client.Execute(request);

        Console.WriteLine(response.Content);

      }

The problem is am getting an error saying "Invalid grant_type refresh_token".

Could someone tell me what I am doing wrong?

Thank you

Duplicate post

Please refer this thread Re: Unable to authorize access because the client configuration is invalid: invalid_request with the similar query for further discussion.

Topics

Bug Error, Questions Need Help

Views

1.6K

Likes

Translate

Translate

Report

Report
This conversation has been locked.

Getting new Access Token with Refresh Token

New Here ,
Sep 03, 2018

Copy link to clipboard

Copied

HI all,

I am trying to integrate the API to my application. I got my access token however it expired after 1 hour and now am trying to use my refresh token to get a new access token. I am using restsharp to post my requests.  Below is my code

     public void refreshToken()

      {

         ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;

         var client = new RestClient("https://api.au1.echosign.com/oauth/token");

         var request = new RestRequest(Method.POST);        

         request.AddHeader("content-type", "application/x-www-form-urlencoded");

         request.AddParameter("refresh_token", "my refresh token here");

         request.AddParameter("grant_type", "refresh_token");

         request.AddParameter("client_id", "CBJCHBCAABAAl8PzbSLzHEHbHdUY2UQ0un4S2WmUdJ_W");

         request.AddParameter("client_secret", "my client secret here");

       

        IRestResponse response = client.Execute(request);

        Console.WriteLine(response.Content);

      }

The problem is am getting an error saying "Invalid grant_type refresh_token".

Could someone tell me what I am doing wrong?

Thank you

Duplicate post

Please refer this thread Re: Unable to authorize access because the client configuration is invalid: invalid_request with the similar query for further discussion.

Topics

Bug Error, Questions Need Help

Views

1.6K

Likes

Translate

Translate

Report

Report
Adobe Employee ,
Sep 04, 2018

Copy link to clipboard

Copied

Duplicate post

Please refer this thread Re: Unable to authorize access because the client configuration is invalid: invalid_request with the similar query for further discussion.

Likes

Translate

Translate

Report

Report