javaoauthlinkedin-apilinkedin-jlinkedin-jsapi

linkedin-j 401 for URL: https://api.linkedin.com/uas/oauth/requestToken


I try to log in with linkedIn API. But i get exception:
401 for URL: https://api.linkedin.com/uas/oauth/requestToken

I used this example : http://karanbalkar.com/2013/09/tutorial-57-connect-to-linkedin-using-java-and-oauth/

There is something with this path http[s]://api.linkedin.com/uas/oauth/requestToken

This piece of code call exception:

LinkedInRequestToken requestToken= oauthService.getOAuthRequestToken();

But it doesn`t work. Please, help me!


Solution

  • I would say that for a 401 at that point in the code, probably the key and/or secret are incorrect when you do

    createLinkedInOAuthService(linkedinKey, linkedinSecret)
    

    Please verify that you have the correct values in your code.