I know the questions regarding this have been asked before, but I cannot find a solution. I am trying to access my LinkedIn account through a supposedly easy-to-use python-linkedin library, but cannot do this. According to the Ozgur page https://github.com/ozgur/python-linkedin I need to open the link generated by the .authorization_url function, but this does not work, because I get that my redirect link is incorrect, although I entered it in my application on the developers page LinkedIn That is, when you try to open the link that the .authorization_url function provides, what appears in the browser is the following error message:
"invalid redirect_uri. This value must match the URL registered with the API key.
What I expect is a page on which I can approve access to my account. Can I, as in the code below, specify localhost: 8000 (as the Ozgur page shows) as a redirect link or what kind of connection should it be? Could it be?
from linkedin import linkedin import webbrowser API_KEY = '********' API_SECRET = '*******' RETURN_URL = 'http://localhost:8000' authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values()) print (authentication.authorization_url)
How to do it?
Another question: the above applies to the use of Oauth2, but you can still use Oauth1 in accordance with the developers page and not yet obsolete. However, to use Oauth1, you need four different keys, which are mostly mentioned:
CONSUMER_KEY, CONSUMER_SECRET, USER_TOKEN, USER_SECRET
However, on the application page (i.e. LinkedIn, where the application is registered), I can only find two: ClientID and Client_SECRET, which are for Oauth2. Does this mean that using oauth1 is impossible anyway?
python linkedin
user2069136
source share