Closed evoots-barings closed 6 years ago
What do you try to do exactly ? Every tutorials and examples have been updated recently and are working with Python 3.6.
Could you upload your code (remember to remove your keys).
Thank you for checking in, I have the four boxes set in permissions on linkedin too. Here is the return url the code is giving me (client id taken out of course)
here is the code I am running:
from linkedin.linkedin import (LinkedInAuthentication, LinkedInApplication,
PERMISSIONS)
if __name__ == '__main__':
CLIENT_ID = '######'
CLIENT_SECRET = '########'
RETURN_URL = 'http://localhost:8080/code/'
authentication = LinkedInAuthentication(
CLIENT_ID,
CLIENT_SECRET,
RETURN_URL,
permissions=['r_basicprofile',
'r_emailaddress',
'rw_company_admin',
'w_share']
)
# Note: edit permissions according to what you defined in the linkedin
# developer console.
# Optionally one can send custom "state" value that will be returned from
# OAuth server It can be used to track your user state or something else
# (it's up to you) Be aware that this value is sent to OAuth server AS IS -
# make sure to encode or hash it
# authorization.state = 'your_encoded_message'
print(authentication.authorization_url)
application = LinkedInApplication(authentication)
Just use the example provided here: https://github.com/DEKHTIARJonathan/python3-linkedin/blob/master/examples/http_api.py
If this solved your issue @evoots-barings, please close this one.
Apologies for the delayed response. I am getting the same error with http_api.py
I think you have incorrectly set up your app on the LinkedIn Dev Platform.
I'm sorry however this code works for everyone, your error come from your side.
What could be incorrectly setup on the LinkedIn Dev Platform? I can provide any information you might need.
I would check authorized callback urls
Okay cool, I haven't modified them since my original post. Is the correct one missing? I tried a a couple of different options:
http://localhost:8080/code https://localhost:8080/code/ http://localhost:8080/code/signin-linkedin https://localhost:8080/code/signin-linkedin https%3A//locahost%3A8080/code/ https://appname.auth0.com/login/callback https://appname.auth0.com
Specifically I was using "http://localhost:8080/code/" in my code, the other examples came from other posts I've seen across the interwebs.
What is the exact error that is displayed ?
Sorry for the delayed response. I am getting the error attached:
I close this issue, your error is explained in a very clear manner. Fix the redirect url and use the same one between your application and what you declared in your application in the LinkedIn developer consoler
Thats what I did though... Okay thank you for your time.
Hi,
I saw this post but the fixes don't seem to work with python 3.6?
https://gist.github.com/dergachev/7028596
I've added the following urls for redirect uris:
http://localhost:8080/code https://localhost:8080/code/ http://localhost:8080/code/signin-linkedin https://localhost:8080/code/signin-linkedin https%3A//locahost%3A8080/code/ https://appname.auth0.com/login/callback https://appname.auth0.com
This happens when trying the code on:
http_api.py and on oauth2_authentication.py
Please advise what additional information you might need.