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

Error: "Invalid grant_type refresh_token"

Community Beginner ,
Jun 23, 2020 Jun 23, 2020

Copy link to clipboard

Copied

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?p... 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

TOPICS
Login issues , SharePoint and Salesforce integration

Views

5.5K

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

correct answers 2 Correct answers

Adobe Employee , Sep 04, 2018 Sep 04, 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.

Votes

Translate

Translate
Community Beginner , Jun 25, 2020 Jun 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. 

Votes

Translate

Translate
Community Beginner ,
Jun 24, 2020 Jun 24, 2020

Copy link to clipboard

Copied

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?

 

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
Community Beginner ,
Jun 25, 2020 Jun 25, 2020

Copy link to clipboard

Copied

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. 

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
New Here ,
Jun 11, 2021 Jun 11, 2021

Copy link to clipboard

Copied

LATEST

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

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
Community Beginner ,
Sep 03, 2018 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

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
Adobe Employee ,
Sep 04, 2018 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.

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
New Here ,
May 23, 2019 May 23, 2019

Copy link to clipboard

Copied

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

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
Adobe Employee ,
Jul 26, 2019 Jul 26, 2019

Copy link to clipboard

Copied

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

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
New Here ,
Sep 18, 2020 Sep 18, 2020

Copy link to clipboard

Copied

I am getting the same error. 

{
"code": "INVALID_ACCESS_TOKEN",
"message": "Access token provided is invalid or has expired"
}

 

Then I tried to refresh the token, I am getting the following response

 

{
"error_description": "Invalid grant_type refresh_token",
"error": "invalid_request"
}

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