Skip to content

Instantly share code, notes, and snippets.

View awachat's full-sized avatar

Vaibhav Awachat awachat

View GitHub Profile
@awachat
awachat / linkedin-v2-oauth2.py
Last active August 12, 2021 19:17
Linkedin client to get firstName, lastName, profilePicture, emailAddress from OAuth2.0 access token using Linkedin 2.0 APIs
class LinkedinClient(object):
"""
Usage:
client = LinkedinClient(access_token)
user_details = client.get_user_details()
"""
FIELD_SELECTORS = ['id', 'firstName', 'lastName',
'profilePicture(displayImage~:playableStreams)',
'emailAddress']