I am trying to get LinkedIn connections through its python API.
Now the code can call get_profile() function, but when I tried application.get_connections()
, it gives me the error showing:
linkedin.exceptions.LinkedInError: 403 Client Error: Forbidden for url: https://api.linkedin.com/v1/people/~/connections?oauth2_access_token=...
My linkedin application permissions only have 4 choices: r_basicprofile, r_emailaddress, rw_company_admin, w_share
The redirect url I am using is http://localhost/
So, do you know how can I get LinkedIn connections through python API?
My code:
from linkedin import linkedin as lk
new_token = [my token]
application = lk.LinkedInApplication(token=new_token)
p = application.get_profile() # this one works
c = application.get_connections()
print p
print c