Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top