This took me a while to find out... I hope you guys will help me out.
Just debugging with Eclipse inside the OAuth classes I found out that when is doing the POST request for the access_token no variables are passed on the body of the POST.
I'm sure that I'm doing something wrong but I don't know why. The first part of the process requesting the code is working fine I can see the code being returned but as soon as is going against the server I get a 400.
So finally I see that on the RestTemplate.class where:
Empty variables. Please see attached screenshot.Code:URI expanded = uriTemplate.expand(urlVariables); return doExecute(expanded, method, requestCallback, responseExtractor);
And this is the answer I'm getting back from the provider:
Also here is the config of my resource:Code:{code=400, error_message=You must provide a client_secret, error_type=OAuthException}
As you can see I'm trying to access the instagram api.Code:<oauth:resource id="instagram" bearerTokenMethod="query" bearerTokenName="access_token" accessTokenUri="https://api.instagram.com/oauth/access_token" type="authorization_code" clientId="XXX" clientSecret="YYY" userAuthorizationUri="https://api.instagram.com/oauth/authorize"/>
Any help will be appreciated.
Thx.


Reply With Quote
