LinkedIn API を使用して、Google アプリ エンジンに基づいてシステムにユーザーをログインさせようとしています。私はそれを実装するために ozgur/python-linkedin ライブラリを使用しています。
print authentication.authorization_url
これまでのところ、 を取得できるようになりました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()
get_access_token
メソッドを呼び出すと、次のエラーが発生します。
ConnectionError: HTTPSConnectionPool(host='www.linkedin.com', port=443): URL: /uas/oauth2/accessToken で最大再試行回数を超えました (原因: [Errno 13] 許可が拒否されました)