Skip to main content
New Participant
September 4, 2018
Answered

Error: "Invalid grant_type refresh_token"

  • September 4, 2018
  • 3 replies
  • 9548 views

I'm implementing an application that uses the Adobe Sign REST API and use OAuth for authentication/authorization. I have implemented the initial OAuth authentication and I store the access token and refresh token for later usage. 

 

However I'm not able to get a new access token by using the refresh token. I get the following error message: {"error_description":"Invalid grant_type refresh_token","error":"invalid_request"}. Do I need to do something in order to get that grant type to work?

 

I noticed a similar topic here https://community.adobe.com/t5/adobe-sign/getting-new-access-token-with-refresh-token/m-p/10086399?page=1#M9282 which says that "integration key" is not enabled by default for developer account, but I don't understand how that is related to refressing the token. 

 

Any ideas? Below is an example how I'm trying to do it:

 

var client = new IO.Swagger.Client.ApiClient();
client.RestClient.BaseUrl = new Uri( "https://api.eu1.echosign.com/oauth/token" );
var request = new RestRequest();
request.Method = Method.POST;
request.AddHeader( "content-type", "application/x-www-form-urlencoded" );
request.AddParameter( "refresh_token", <refreshToken> );
request.AddParameter( "grant_type", "refresh_token" );
request.AddParameter( "client_id", "<client id>" );
request.AddParameter( "client_secret", "<client secret>" );
IRestResponse response = client.RestClient.ExecuteAsPost( request, "POST" );

 

 

Regards,

E

This topic has been closed for replies.
Correct answer eeveli

Looks like I was trying to refresh the token by using the wrong endpoint. Instead of using 

https://api.eu1.echosign.com/oauth/token

I should have used 

https://api.eu1.echosign.com/oauth/refresh

 

This is resolved. 

3 replies

eeveliAuthor
New Participant
June 25, 2020

It is said in https://www.adobe.io/authentication/auth-methods.html#!AdobeDocs/adobeio-auth/master/OAuth/OAuth.md:

Note: Not all product APIs support the refresh_token grant type. You may not be able to get a valid response for such integrations. Please try creating a Service Account Integration for such APIs to create a service-service integration.

Does this mean that it's not possible to refresh an access token with refresh_token for Adobe Sign?

 

eeveliAuthorCorrect answer
New Participant
June 25, 2020

Looks like I was trying to refresh the token by using the wrong endpoint. Instead of using 

https://api.eu1.echosign.com/oauth/token

I should have used 

https://api.eu1.echosign.com/oauth/refresh

 

This is resolved. 

New Participant
June 11, 2021

That is correct. It worked for me as well. Thank you for the help.

New Participant
May 23, 2019

What is happening with Flow and Adobe Sign... It really is a terrible experience and the helpdesk 'chatbots' are also not helping out. Adobe is actively limiting document signing actions to 2 per month.... How can we test a freaking solution this way. ADOBE GET YOUR ACT TOGETHER

Meenakshi Negi
Community Manager
Community Manager
July 26, 2019

Hi Sjoerdd,

Sorry for the delay in response.

I have checked your account with the email address used to sign in to the forums. You are using Adobe Sign free service.

In the Adobe Sign free service, the transaction limits to send document is two per month with the 30 days of rolling window.

If you need to test the Microsoft Flow with Adobe Sign integration, please register for the free Developer edition of Adobe Sign over here Create Developer Account, APIs for custom applications | Adobe Sign

Please make sure that you use a different email address for the registration which is not used for any other Adobe Sign account.

I would recommend you to contact the Pre-Sales team to get the integration settings enabled. They will be able to provide you the pre-sales technical assistance.

Please refer this link to get in contact with them: Adobe Sign plans for individuals and businesses | Adobe Document Cloud

I hope the information will help.

Let us know if you have any questions.

Regards,

Meenakshi

New Participant
September 4, 2018

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

Meenakshi Negi
Community Manager
Community Manager
September 4, 2018

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.