将LinkedIn API与Python结合使用

2024-09-28 01:30:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用LinkedIn API让用户登录到我们基于谷歌应用引擎的系统。我正在使用ozgur/pythonLinkedIn库来实现它。在

到目前为止,我已经能够print authentication.authorization_url,并获得{}。在

 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()

现在,一旦我调用get_access_token方法,就会出现以下错误:

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


Tags: 用户引擎tokenapiurlgetauthenticationaccess

热门问题