4

I am trying to use LinkedIn API for getting user logged in to our system based on google app engine. I am using ozgur/python-linkedin library for implementing it.

Now so far I am getting able to print authentication.authorization_url, and obtain the authentication.authorization_code.

 authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values())
 print authentication.authorization_url  # open this url on your browser
 application = linkedin.LinkedInApplication(authentication)
 authentication.authorization_code = 'xxxxxxxxxxxxxxxxxxx'
 authentication.get_access_token()

Now once I call get_access_token method I am getting this error:

ConnectionError: HTTPSConnectionPool(host='www.linkedin.com', port=443): Max retries exceeded with url: /uas/oauth2/accessToken (Caused by : [Errno 13] Permission denied)

Ffisegydd
  • 51,807
  • 15
  • 147
  • 125
Rohit Barnwal
  • 482
  • 6
  • 19
  • 1
    I too use linkedin to log in with gae but I do it with simpleauth. It works pretty good with simpleauth and if you still have problems with ozgur/python-linkedin then you might want to try simpleauth for gae logins. – Niklas Rosencrantz May 06 '15 at 14:40
  • 1
    I am looking simpleauth, can you just quickly tell me how to get the arguments(data, auth_info, provider) in _on_signin method? – Rohit Barnwal May 06 '15 at 15:08
  • Yes, you map it with webapp2 like `/auth/` and then you can make a request like `/auth/linkedin` to your app. You might need some more adjustments, if so you look in the authhandler for simpleauth. It can also authenticate via Facebook and Foursquare so I think it is pretty good. If you have problems with simpleauth then please post a new question and we can help you more there. – Niklas Rosencrantz May 06 '15 at 15:26
  • Do I need any permission from LinkedIn to get email id of user who signs in to my system? Kindly reply soon :) – Rohit Barnwal May 08 '15 at 08:30

0 Answers0