CONSUMER_KEY = '9pux1XcwXXXXXXXXXX'
CONSUMER_SECRET = 'brtXoXEXXXXXXXXXXXXX'
USER_TOKEN = '27138ae8-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXb'
USER_SECRET = 'ca103e23-XXXXXXXXXXXXXXXXXXXXXXXX7bba512625e'
RETURN_URL = 'http://localhost:8000'
from linkedin import linkedin
from oauthlib import *
authentication = linkedin.LinkedInDeveloperAuthentication(CONSUMER_KEY,
    CONSUMER_SECRET, USER_TOKEN, USER_SECRET, RETURN_URL, list(linkedin.
    PERMISSIONS.enums.values()))
application = linkedin.LinkedInApplication(authentication)
g = application.get_profile()
print(g)
Как использовать API LinkedIn с Python