DEKHTIARJonathan / python3-linkedin

Python3 interface to the LinkedIn API
https://dekhtiarjonathan.github.io/python3-linkedin/
MIT License
84 stars 36 forks source link

localhost refused to connect #14

Closed ahnugent closed 6 years ago

ahnugent commented 6 years ago

I followed the 'Production Authentication' steps, with "http://localhost:8080/code" in the Authorized Redirect URL's. After running the script, the print (authentication.authorization_url) statement gives,

https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=MY_CLIENT_ID&scope=r_basicprofile%20r_emailaddress%20w_share%20rw_company_admin%20r_fullprofile%20r_contactinfo&state=82d1166c8138c898891583357c480e12&redirect_uri=http%3A//localhost%3A8080

(where MY_CLIENT_ID is a 14-char string). When I go to http://localhost:8080 I see "This site can’t be reached / localhost refused to connect."

Is something missing?

DEKHTIARJonathan commented 6 years ago

You are running Windows maybe? Sometimes you have to green flag python in the firewall

The code is perfectly working I just tested it again.

Maybe try to use a virtualenv, it could help


Btw. Is there any chance we know each other? I'm quite convinced that we already talked somewhere...

ahnugent commented 6 years ago

Thanks, Johnathon. Yes, Windows 10. Norton 360 controls the firewall, and it is already allowing python.exe on the path containing the conda environment I'm using, so I think there must be a different root cause.

Maybe we talked about a similar issue once. I gave up trying to get the API to work on a previous attempt, and I'm just coming back to it.

DEKHTIARJonathan commented 6 years ago

You are the only one having an issue with it. Maybe try to modify the example with flask library.

Anyway it is an just an example, the http server stuff is not required to make this work