Question

final LinkedInOAuthService oauthService = LinkedInOAuthServiceFactory.getInstance().createLinkedInOAuthService(consumerKeyValue, consumerSecretValue);
LinkedInRequestToken requestToken = oauthService.getOAuthRequestToken(callbackUrl);
session.setAttribute("requestToken", requestToken);
String authUrl = requestToken.getAuthorizationUrl(); 
return new ModelAndView("redirect:" + authUrl);

I am using the above code block to make user grant permission to my application from LinkedIN. The authorization screen is appearing everytime when I redirect user to authURL with the same default scope. Not able to figure out if I am missing anything here.

Était-ce utile?

La solution

You should change your OAuth endpoint from https://www.linkedin.com/uas/oauth/authorize to https://www.linkedin.com/uas/oauth/authenticate. This should work for you.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top