Error: "Invalid grant_type refresh_token"
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
