Python interface to the LinkedIn API

Overview

Python LinkedIn

Python interface to the LinkedIn API

LinkedIn

This library provides a pure Python interface to the LinkedIn Profile, Group, Company, Jobs, Search, Share, Network and Invitation REST APIs.

LinkedIn provides a service that lets people bring their LinkedIn profiles and networks with them to your site or application via their OAuth based API. This library provides a lightweight interface over a complicated LinkedIn OAuth based API to make it for python programmers easy to use.

Installation

Build Status

You can install python-linkedin library via pip:

$ pip install python-linkedin

Authentication

The LinkedIn REST API now supports the OAuth 2.0 protocol for authentication. This package provides a full OAuth 2.0 implementation for connecting to LinkedIn as well as an option for using an OAuth 1.0a flow that can be helpful for development purposes or just accessing your own data.

HTTP API example

Set LINKEDIN_API_KEY and LINKEDIN_API_SECRET, configure your app to redirect to http://localhost:8080/code, then execute:

  1. http_api.py
  2. Visit http://localhost:8080 in your browser, curl or similar
  3. A tab in your browser will open up, give LinkedIn permission there
  4. You'll then be presented with a list of available routes, hit any, e.g.:
  5. curl -XGET http://localhost:8080/get_profile

Developer Authentication

To connect to LinkedIn as a developer or just to access your own data, you don't even have to implement an OAuth 2.0 flow that involves redirects. You can simply use the 4 credentials that are provided to you in your LinkedIn appliation as part of an OAuth 1.0a flow and immediately access your data. Here's how:

from linkedin import linkedin

# Define CONSUMER_KEY, CONSUMER_SECRET,  
# USER_TOKEN, and USER_SECRET from the credentials 
# provided in your LinkedIn application

# Instantiate the developer authentication class

authentication = linkedin.LinkedInDeveloperAuthentication(CONSUMER_KEY, CONSUMER_SECRET, 
                                                          USER_TOKEN, USER_SECRET, 
                                                          RETURN_URL, linkedin.PERMISSIONS.enums.values())

# Pass it in to the app...

application = linkedin.LinkedInApplication(authentication)

# Use the app....

application.get_profile()

Production Authentication

In order to use the LinkedIn OAuth 2.0, you have an application key and application secret. You can get more detail from here.

For debugging purposes you can use the credentials below. It belongs to my test application. Nothing's harmful.

KEY = 'wFNJekVpDCJtRPFX812pQsJee-gt0zO4X5XmG6wcfSOSlLocxodAXNMbl0_hw3Vl'
SECRET = 'daJDa6_8UcnGMw1yuq9TjoO_PMKukXMo8vEMo7Qv5J-G3SPgrAV0FqFCd0TNjQyG'

You can also get those keys from here.

LinkedIn redirects the user back to your website's URL after granting access (giving proper permissions) to your application. We call that url RETURN URL. Assuming your return url is http://localhost:8000, you can write something like this:

from linkedin import linkedin

API_KEY = 'wFNJekVpDCJtRPFX812pQsJee-gt0zO4X5XmG6wcfSOSlLocxodAXNMbl0_hw3Vl'
API_SECRET = 'daJDa6_8UcnGMw1yuq9TjoO_PMKukXMo8vEMo7Qv5J-G3SPgrAV0FqFCd0TNjQyG'
RETURN_URL = 'http://localhost:8000'

authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values())
# 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  # open this url on your browser
application = linkedin.LinkedInApplication(authentication)

When you grant access to the application, you will be redirected to the return url with the following query strings appended to your RETURN_URL:

"http://localhost:8000/?code=AQTXrv3Pe1iWS0EQvLg0NJA8ju_XuiadXACqHennhWih7iRyDSzAm5jaf3R7I8&state=ea34a04b91c72863c82878d2b8f1836c"

This means that the value of the authorization_code is AQTXrv3Pe1iWS0EQvLg0NJA8ju_XuiadXACqHennhWih7iRyDSzAm5jaf3R7I8. After setting it by hand, we can call the .get_access_token() to get the actual token.

authentication.authorization_code = 'AQTXrv3Pe1iWS0EQvLg0NJA8ju_XuiadXACqHennhWih7iRyDSzAm5jaf3R7I8'
authentication.get_access_token()

After you get the access token, you are now permitted to make API calls on behalf of the user who granted access to you app. In addition to that, in order to prevent from going through the OAuth flow for every consecutive request, one can directly assign the access token obtained before to the application instance.

application = linkedin.LinkedInApplication(token='AQTFtPILQkJzXHrHtyQ0rjLe3W0I')

Quick Usage From Python Interpreter

For testing the library using an interpreter, you can benefit from the test server.

from linkedin import server
application = server.quick_api(KEY, SECRET)

This will print the authorization url to the screen. Go into that URL using a browser to grant access to the application. After you do so, the method will return with an API object you can now use.

Profile API

The Profile API returns a member's LinkedIn profile. You can use this call to return one of two versions of a user's profile which are public profile and standard profile. For more information, check out the documentation.

application.get_profile()
{u'firstName': u'ozgur',
 u'headline': u'This is my headline',
 u'lastName': u'vatansever',
 u'siteStandardProfileRequest': {u'url': u'http://www.linkedin.com/profile/view?id=46113651&authType=name&authToken=Egbj&trk=api*a101945*s101945*'}}

There are many field selectors that enable the client fetch more information from the API. All of them used by each API are listed here.

application.get_profile(selectors=['id', 'first-name', 'last-name', 'location', 'distance', 'num-connections', 'skills', 'educations'])
{u'distance': 0,
 u'educations': {u'_total': 1,
  u'values': [{u'activities': u'This is my activity and society field',
    u'degree': u'graduate',
    u'endDate': {u'year': 2009},
    u'fieldOfStudy': u'computer science',
    u'id': 42611838,
    u'notes': u'This is my additional notes field',
    u'schoolName': u'\u0130stanbul Bilgi \xdcniversitesi',
    u'startDate': {u'year': 2004}}]},
 u'firstName': u'ozgur',
 u'id': u'COjFALsKDP',
 u'lastName': u'vatansever',
 u'location': {u'country': {u'code': u'tr'}, u'name': u'Istanbul, Turkey'},
 u'numConnections': 13}

Connections API

The Connections API returns a list of 1st degree connections for a user who has granted access to their account. For more information, you check out its documentation.

To fetch your connections, you simply call .get_connections() method with proper GET querystring:

application.get_connections()
{u'_total': 13,
 u'values': [{u'apiStandardProfileRequest': {u'headers': {u'_total': 1,
     u'values': [{u'name': u'x-li-auth-token', u'value': u'name:16V1033'}]},
    u'url': u'http://api.linkedin.com/v1/people/lddvGtD5xk'},
   u'firstName': u'John',
   u'headline': u'Ruby',
   u'id': u'2323SDFSsfd34',
   u'industry': u'Computer Software',
   u'lastName': u'DOE',
   u'location': {u'country': {u'code': u'tr'}, u'name': u'Istanbul, Turkey'},
   u'siteStandardProfileRequest': {u'url': u'http://www.linkedin.com/profile/view?id=049430532&authType=name&authToken=16V8&trk=api*a101945*s101945*'}},
   ....

application.get_connections(selectors=['headline', 'first-name', 'last-name'], params={'start':10, 'count':5})

Search API

There are 3 types of Search APIs. One is the People Search API, second one is the Company Search API and the last one is Jobs Search API.

The People Search API returns information about people. It lets you implement most of what shows up when you do a search for "People" in the top right box on LinkedIn.com. You can get more information from here.

application.search_profile(selectors=[{'people': ['first-name', 'last-name']}], params={'keywords': 'apple microsoft'})
# Search URL is https://api.linkedin.com/v1/people-search:(people:(first-name,last-name))?keywords=apple%20microsoft

{u'people': {u'_count': 10,
  u'_start': 0,
  u'_total': 2,
  u'values': [
   {u'firstName': u'John', u'lastName': 'Doe'},
   {u'firstName': u'Jane', u'lastName': u'Doe'}
  ]}}

The Company Search API enables search across company pages. You can get more information from here.

application.search_company(selectors=[{'companies': ['name', 'universal-name', 'website-url']}], params={'keywords': 'apple microsoft'})
# Search URL is https://api.linkedin.com/v1/company-search:(companies:(name,universal-name,website-url))?keywords=apple%20microsoft

{u'companies': {u'_count': 10,
  u'_start': 0,
  u'_total': 1064,
  u'values': [{u'name': u'Netflix',
    u'universalName': u'netflix',
    u'websiteUrl': u'http://netflix.com'},
   {u'name': u'Alliance Data',
    u'universalName': u'alliance-data',
    u'websiteUrl': u'www.alliancedata.com'},
   {u'name': u'GHA Technologies',
    u'universalName': u'gha-technologies',
    u'websiteUrl': u'www.gha-associates.com'},
   {u'name': u'Intelligent Decisions',
    u'universalName': u'intelligent-decisions',
    u'websiteUrl': u'http://www.intelligent.net'},
   {u'name': u'Mindfire Solutions',
    u'universalName': u'mindfire-solutions',
    u'websiteUrl': u'www.mindfiresolutions.com'},
   {u'name': u'Babel Media',
    u'universalName': u'babel-media',
    u'websiteUrl': u'http://www.babelmedia.com/'},
   {u'name': u'Milestone Technologies',
    u'universalName': u'milestone-technologies',
    u'websiteUrl': u'www.milestonepowered.com'},
   {u'name': u'Denali Advanced Integration',
    u'universalName': u'denali-advanced-integration',
    u'websiteUrl': u'www.denaliai.com'},
   {u'name': u'MicroAge',
    u'universalName': u'microage',
    u'websiteUrl': u'www.microage.com'},
   {u'name': u'TRUSTe',
    u'universalName': u'truste',
    u'websiteUrl': u'http://www.truste.com/'}]}}

The Job Search API enables search across LinkedIn's job postings. You can get more information from here.

application.search_job(selectors=[{'jobs': ['id', 'customer-job-code', 'posting-date']}], params={'title': 'python', 'count': 2})
{u'jobs': {u'_count': 2,
  u'_start': 0,
  u'_total': 206747,
  u'values': [{u'customerJobCode': u'0006YT23WQ',
    u'id': 5174636,
    u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}},
   {u'customerJobCode': u'00023CCVC2',
    u'id': 5174634,
    u'postingDate': {u'day': 21, u'month': 3, u'year': 2013}}]}}

Group API

The Groups API provides rich access to read and interact with LinkedIn’s groups functionality. You can get more information from here. By the help of the interface, you can fetch group details, get your group memberships as well as your posts for a specific group which you are a member of.

application.get_group(41001)
{u'id': u'41001', u'name': u'Object Oriented Programming'}

application.get_memberships(params={'count': 20})
{u'_total': 1,
 u'values': [{u'_key': u'25827',
   u'group': {u'id': u'25827', u'name': u'Python Community'},
   u'membershipState': {u'code': u'member'}}]}

application.get_posts(41001)

application.get_post_comments(
    %POST_ID%,
    selectors=[
        {"creator": ["first-name", "last-name"]},
        "creation-timestamp",
        "text"
    ],
    params={"start": 0, "count": 20}
) 

You can also submit a new post into a specific group.

title = 'Scala for the Impatient'
summary = 'A new book has been published'
submitted_url = 'http://horstmann.com/scala/'
submitted_image_url = 'http://horstmann.com/scala/images/cover.png'
description = 'It is a great book for the keen beginners. Check it out!'

application.submit_group_post(41001, title, summary, submitted_url, submitted_image_url, description)

Company API

The Company API:

  • Retrieves and displays one or more company profiles based on the company ID or universal name.
  • Returns basic company profile data, such as name, website, and industry.
  • Returns handles to additional company content, such as RSS stream and Twitter feed.

You can query a company with either its ID or Universal Name. For more information, you can check out the documentation here.

application.get_companies(company_ids=[1035], universal_names=['apple'], selectors=['name'], params={'is-company-admin': 'true'})
# 1035 is Microsoft
# The URL is as follows: https://api.linkedin.com/v1/companies::(1035,universal-name=apple)?is-company-admin=true

{u'_total': 2,
 u'values': [{u'_key': u'1035', u'name': u'Microsoft'},
  {u'_key': u'universal-name=apple', u'name': u'Apple'}]}

# Get the latest updates about Microsoft
application.get_company_updates(1035, params={'count': 2})
{u'_count': 2,
 u'_start': 0,
 u'_total': 58,
 u'values': [{u'isCommentable': True,
   u'isLikable': True,
   u'isLiked': False,
   u'numLikes': 0,
   u'timestamp': 1363855486620,
   u'updateComments': {u'_total': 0},
   u'updateContent': {u'company': {u'id': 1035, u'name': u'Microsoft'},
    u'companyJobUpdate': {u'action': {u'code': u'created'},
     u'job': {u'company': {u'id': 1035, u'name': u'Microsoft'},
      u'description': u'Job Category: SalesLocation: Sacramento, CA, USJob ID: 812346-106756Division: Retail StoresStore...',
      u'id': 5173319,
      u'locationDescription': u'Sacramento, CA, US',
      u'position': {u'title': u'Store Manager, Specialty Store'},
      u'siteJobRequest': {u'url': u'http://www.linkedin.com/jobs?viewJob=&jobId=5173319'}}}},
   u'updateKey': u'UNIU-c1035-5720424522989961216-FOLLOW_CMPY',
   u'updateType': u'CMPY'},
  {u'isCommentable': True,
   u'isLikable': True,
   u'isLiked': False,
   u'numLikes': 0,
   u'timestamp': 1363855486617,
   u'updateComments': {u'_total': 0},
   u'updateContent': {u'company': {u'id': 1035, u'name': u'Microsoft'},
    u'companyJobUpdate': {u'action': {u'code': u'created'},
     u'job': {u'company': {u'id': 1035, u'name': u'Microsoft'},
      u'description': u'Job Category: Software Engineering: TestLocation: Redmond, WA, USJob ID: 794953-81760Division:...',
      u'id': 5173313,
      u'locationDescription': u'Redmond, WA, US',
      u'position': {u'title': u'Software Development Engineer in Test, Senior-IEB-MSCIS (794953)'},
      u'siteJobRequest': {u'url': u'http://www.linkedin.com/jobs?viewJob=&jobId=5173313'}}}},
   u'updateKey': u'UNIU-c1035-5720424522977378304-FOLLOW_CMPY',
   u'updateType': u'CMPY'}]}

You can follow or unfollow a specific company as well.

application.follow_company(1035)
True

application.unfollow_company(1035)
True

Job API

The Jobs APIs provide access to view jobs and job data. You can get more information from its documentation.

application.get_job(job_id=5174636)
{u'active': True,
 u'company': {u'id': 2329, u'name': u'Schneider Electric'},
 u'descriptionSnippet': u"The Industrial Accounts Sales Manager is a quota carrying senior sales position principally responsible for generating new sales and growing company's share of wallet within the industrial business, contracting business and consulting engineering business. The primary objective is to build and establish strong and lasting relationships with technical teams and at executive level within specific in",
 u'id': 5174636,
 u'position': {u'title': u'Industrial Accounts Sales Manager'},
 u'postingTimestamp': 1363860033000}

You can also fetch you job bookmarks.

application.get_job_bookmarks()
{u'_total': 0}

Share API

Network updates serve as one of the core experiences on LinkedIn, giving users the ability to share rich content to their professional network. You can get more information from here.

application.submit_share('Posting from the API using JSON', 'A title for your share', None, 'http://www.linkedin.com', 'http://d.pr/3OWS')
{'updateKey': u'UNIU-8219502-5705061301949063168-SHARE'
 'updateURL': 'http://www.linkedin.com/updates?discuss=&scope=8219502&stype=M&topic=5705061301949063168&type=U&a=aovi'}

Network API

The Get Network Updates API returns the users network updates, which is the LinkedIn term for the user's feed. This call returns most of what shows up in the middle column of the LinkedIn.com home page, either for the member or the member's connections. You can get more information from here.

There are many network update types. You can look at them by importing NETWORK_UPDATES enumeration.

from linkedin.linkedin import NETWORK_UPDATES
print NETWORK_UPDATES.enums
{'APPLICATION': 'APPS',
 'CHANGED_PROFILE': 'PRFU',
 'COMPANY': 'CMPY',
 'CONNECTION': 'CONN',
 'EXTENDED_PROFILE': 'PRFX',
 'GROUP': 'JGRP',
 'JOB': 'JOBS',
 'PICTURE': 'PICT',
 'SHARED': 'SHAR',
 'VIRAL': 'VIRL'}

update_types = (NETWORK_UPDATES.CONNECTION, NETWORK_UPDATES.PICTURE)
application.get_network_updates(update_types)

{u'_total': 1,
 u'values': [{u'isCommentable': True,
   u'isLikable': True,
   u'isLiked': False,
   u'numLikes': 0,
   u'timestamp': 1363470126509,
   u'updateComments': {u'_total': 0},
   u'updateContent': {u'person': {u'apiStandardProfileRequest': {u'headers': {u'_total': 1,
       u'values': [{u'name': u'x-li-auth-token', u'value': u'name:Egbj'}]},
      u'url': u'http://api.linkedin.com/v1/people/COjFALsKDP'},
     u'firstName': u'ozgur',
     u'headline': u'This is my headline',
     u'id': u'COjFALsKDP',
     u'lastName': u'vatansever',
     u'siteStandardProfileRequest': {u'url': u'http://www.linkedin.com/profile/view?id=46113651&authType=name&authToken=Egbj&trk=api*a101945*s101945*'}}},
   u'updateKey': u'UNIU-46113651-5718808205493026816-SHARE',
   u'updateType': u'SHAR'}]}

Invitation API

The Invitation API allows your users to invite people they find in your application to their LinkedIn network. You can get more information from here.

from linkedin.models import LinkedInRecipient, LinkedInInvitation
recipient = LinkedInRecipient(None, '[email protected]', 'John', 'Doe')
print recipient.json
{'person': {'_path': '/people/[email protected]',
  'first-name': 'John',
  'last-name': 'Doe'}}

invitation = LinkedInInvitation('Hello John', "What's up? Can I add you as a friend?", (recipient,), 'friend')
print invitation.json
{'body': "What's up? Can I add you as a friend?",
 'item-content': {'invitation-request': {'connect-type': 'friend'}},
 'recipients': {'values': [{'person': {'_path': '/people/[email protected]',
     'first-name': 'John',
     'last-name': 'Doe'}}]},
 'subject': 'Hello John'}

application.send_invitation(invitation)
True

Throttle Limits

LinkedIn API keys are throttled by default. You should take a look at the Throttle Limits Documentation to get more information about it.

Comments
  • 400 Client Error: Bad Request on get_access_token

    400 Client Error: Bad Request on get_access_token

    Hi,

    I'm trying to use your library however I'm getting error when I call get_access_token.

    After getting authorization_code, I'm calling: authentication = linkedin.LinkedInAuthentication(API_KEY, API_SECRET, RETURN_URL, linkedin.PERMISSIONS.enums.values()) authentication.authorization_code = '?????????' authentication.get_access_token()

    This throw an exception: Traceback (most recent call last): File "teste.py", line 12, in authentication.get_access_token() File "/usr/local/lib/python2.7/dist-packages/python_linkedin-2.0-py2.7.egg/linkedin/linkedin.py", line 96, in get_access_token raise LinkedInHTTPError(error.message) linkedin.exceptions.LinkedInHTTPError: 400 Client Error: Bad Request

    opened by trunet 13
  • "Legacy App" working with OAuth but new app not working with OAuth

    I am finding a peculiar thing when using this library that I think may reflect an important bug, and I'd like your thoughts on it.

    When I follow the OAuth flow with the "API Key" and "API Secret" from an app I created a couple of years ago (what I will call app1) and plug them into the flow as what you describe in the README.md as "application key" and "application secret", everything works fine. An important detail here is that the length and form of my API Key/Secret values resemble the same ones you use in the README.md as well.

    However, when I create a new app (what I will call app2), I see that I now have an "API Key" a "Secret Key" as well as an "OAuth User Token" and "OAuth User Secret". The length/form of these values do not resemble at all my API Key/Secret from app1 (nor do they resemble your values from the README.md.) Regardless of which combination of these values that I use, the OAuth flow always results in a 401 error.

    I am curious if you might be testing this library with values from an app you created long ago as opposed to an app recently and, thus, experiencing the same troubles that I am? Intuition suggests that this is the case.

    I would be very interested in hearing back from you on this if you could create a brand new app and test, and seeing an update to the README that clarifies the language a bit and includes updated sample app values that work as-is.

    This is currently blocking me, and I'm not quite sure how to proceed without getting down into the guts of the linkedin.py file. Are you able to assist?

    opened by ptwobrussell 10
  • separated auth object from client, shouldn't need to reauth every single...

    separated auth object from client, shouldn't need to reauth every single...

    Requiring instantiation of LinkedInAuthentication and going through the OAuth flow every single time someone uses the API is overkill -- especially if authenticated operations are being performed in HTTP requests of a 3rd party application.

    opened by stantonk 9
  • Python 3.4 support not working

    Python 3.4 support not working

    Hi @ozgur I know this issue has been addresses previously in some other issue id. But I somehow am not able to make this work. I am working on a virtualenvwrapper which is having python 3.4.2

    When I run the http_api.py; I get the following output:

    Traceback (most recent call last): File "http_api.py", line 1, in from linkedin import linkedin File "/home/Saurabh/.virtualenvs/jobfinder/lib/python3.4/site-packages/linkedin/linkedin.py", line 294 except (requests.ConnectionError, requests.HTTPError), error: ^ SyntaxError: invalid syntax

    Please fix this issue as soon as possible, in need urgently. Thanks

    opened by d3prof3t 5
  • LinkedInHTTPError - 401 Client Error: Unauthorized

    LinkedInHTTPError - 401 Client Error: Unauthorized

    I've just 'discovered' your python-linkedin library earlier today and set it up and tried to make it work with Django. But as soon as I set the authorization-code and want to retrieve the access-token with it, I get an LinkedInHTTPError : 401 Client Error: Unauthorized.

    Here's my code; I'm using two views, one that redirects to the LinkedIn authorization page, and one for the return-url:

    from django.shortcuts import render, render_to_response, redirect
    from django.http import HttpResponse
    
    from linkedin import linkedin
    
    
    LI_API_KEY="123abc"
    LI_API_SECRET="xyz123"
    LI_RETURN_URL = 'http://127.0.0.1:8000/skills/linkedin-authcode/'
    
    
    def signup(request):
    
        # Instantiate the developer authentication class
        authentication = linkedin.LinkedInAuthentication(LI_API_KEY, LI_API_KEY,
                                                         LI_RETURN_URL, linkedin.PERMISSIONS.enums.values())
        return redirect( authentication.authorization_url )
    
    
    
    def linkedin_authcode(request):
    
        auth_code = request.GET.get('code', None)
        state = request.GET.get('state', None)
    
        authentication = linkedin.LinkedInAuthentication(LI_API_KEY, LI_API_KEY,
                                                         LI_RETURN_URL, linkedin.PERMISSIONS.enums.values())
        authentication.authorization_code = auth_code
        access_token = authentication.get_access_token()
        print access_token
    
        return HttpResponse("Linked Auth Code return page")
    

    The debug-data I receive is:

    Request Method: GET Request URL: http://127.0.0.1:8000/skills/linkedin-authcode/?code=AQRandalotmore&state=4d64f8aa4b79a1fab3a73909a46bc322 Django Version: 1.6.2 Exception Type: LinkedInHTTPError Exception Value:
    401 Client Error: Unauthorized Exception Location: /Library/Python/2.7/site-packages/linkedin/linkedin.py in get_access_token, line 123 Python Executable: /usr/bin/python Python Version: 2.7.5 Python Path:
    ['/Users/planetcrypton/Sites/coworkerdev', '/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python27.zip', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-darwin', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/plat-mac/lib-scriptpackages', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-old', '/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload', '/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/PyObjC', '/Library/Python/2.7/site-packages'] Server time: Wed, 7 May 2014 12:54:23 +0000

    opened by planetcrypton 5
  • PyPi version is broken .. missing readme.rst

    PyPi version is broken .. missing readme.rst

    gives the following error on pip install .. and readme.rst is missing from the download on the pypi site.

    Downloading/unpacking python-linkedin Downloading python-linkedin-3.0.tar.gz Running setup.py egg_info for package python-linkedin Traceback (most recent call last): File "", line 16, in File "/djangoenv/build/python-linkedin/setup.py", line 12, in with open(os.path.join(os.path.dirname(file), 'README.rst')) as readme: IOError: [Errno 2] No such file or directory: '/djangoenv/build/python-linkedin/README.rst' Complete output from command python setup.py egg_info: Traceback (most recent call last):

    File "", line 16, in

    File "/djangoenv/build/python-linkedin/setup.py", line 12, in

    with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
    

    IOError: [Errno 2] No such file or directory: '/djangoenv/build/python-linkedin/README.rst'

    opened by pg1671 4
  • Passes OAuth parameters as query parameters when getting access token

    Passes OAuth parameters as query parameters when getting access token

    This resolves an ongoing issue with the LinkedIn API where tokens were not functioning immediately after they were acquired. See: http://developer.linkedin.com/forum/unauthorized-invalid-or-expired-token-immediately-after-receiving-oauth2-token

    This also is consistent with the LinkedIn documentation: https://developer.linkedin.com/documents/authentication

    opened by amarkbo 3
  • facet search in people search api

    facet search in people search api

    Hi,

    Thank you for the great lib, works fine.

    I am looking for an example on how to use facets in the people search api

    application.search_profile(selectors=[{'people': ['first-name', 'last-name']}], params=p)

    I have tried the following for p: p={} p['keywords'] = 'datamining' p['countryCode'] = 'nl' p['facet'] = 'location,nl:0' p['company-name'] = 'netwerk%20vsp' p['current-company'] = 'true' p['sort'] = 'connections' p['sort'] = 'recommenders' p['facets'] = 'Industry,Network' p['facet'] = 'industry,41' # no effect no error p['facet'] = 'network,F' # no efect no error

    opened by hugokoopmans 3
  • Added linkedin_group_extra.py file in order to add extra group operations functions

    Added linkedin_group_extra.py file in order to add extra group operations functions

    Did not make any new edition on the original py files. Also added group_operations.py to test the new linkedin_group_extra.py file. The final target of the linkedin_group_extra.py is to assist group managers to identify spamming posts and spammers, through natural language processing, and let group managers to easily manage the groups.

    opened by stevencoding 2
  • Unable to verify access token?

    Unable to verify access token?

    I'm seeing intermittent issues resulting in getting 'Unable to verify access token' from get_profile() after authenticating.

    I'm checking if request.session.has_key('linkedin_access_token'): before calling it and it works fine in most cases.

    Is this a known issue or am I doing something incorrectly?

    opened by listingboat 2
  • get_job does not apply selectors

    get_job does not apply selectors

    function get_job() does not apply provided selectors.

    only need to add following lines after line 437: if selectors: url = '%s:(%s)' % (url, LinkedInSelector.parse(selectors))

    opened by ablimit 2
  • Access to Post Activity

    Access to Post Activity

    I'm looking for to build a dashboard that shows historical post activity. I see there is a share API but does anyone know of way to pull analytics behind shares/posts?

    opened by TallData 0
  • Index error in http_api.py

    Index error in http_api.py

    Here's the error message:

    Exception happened during processing of request from ('127.0.0.1', 57697) Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 647, in process_request_thread self.finish_request(request, client_address) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 357, in finish_request self.RequestHandlerClass(request, client_address, self) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/server.py", line 646, in __init__ super().__init__(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/socketserver.py", line 717, in __init__ self.handle() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/server.py", line 426, in handle self.handle_one_request() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/server.py", line 414, in handle_one_request method() File "examples/http_api.py", line 51, in do_GET liw.authentication.authorization_code = params_to_d(self.path).get('code') File "examples/http_api.py", line 34, in <lambda> l[0]: l[1] for l in map(lambda j: j.split('='), urlparse(params).query.split('&')) File "examples/http_api.py", line 34, in <dictcomp> l[0]: l[1] for l in map(lambda j: j.split('='), urlparse(params).query.split('&')) IndexError: list index out of range

    opened by JoseMMontoro 0
  • Issue with http_api.py

    Issue with http_api.py

    When running http_api.py its giving me this error:

    Mathiss-iMac:match_ai mathis$ python3 http_api.py
    Traceback (most recent call last):
      File "http_api.py", line 17, in <module>
        from linkedin.linkedin import LinkedInAuthentication, LinkedInApplication, PERMISSIONS
      File "/usr/local/lib/python3.7/site-packages/linkedin/linkedin.py", line 294
        except (requests.ConnectionError, requests.HTTPError), error:
                                                             ^
    SyntaxError: invalid syntax
    

    I have looked through the previous issues and found that #86 is a similar issue. But this was in august of 2015, so I'm not sure if this has been fixed and re-appeared or if it hasn't yet.

    Currently using Python 3.7.3 with linkedin==0.1.5.

    I hope it can get resolved. Thanks!

    opened by mathisve 3
  • unauthorized_scope_error

    unauthorized_scope_error

    When trying to follow the tutorial to get the tokens, the URL contains "".

    This may be related to and API update on march 1,2019. https://stackoverflow.com/questions/53479131/unauthorized-scope-error-in-linkedin-oauth2-authentication

    opened by blackTay 0
Owner
ozgur
Senior Software Engineer
ozgur
👨‍💼Linkedin API for Python

linkedin_api ??‍?? Linkedin API for Python No "official" API access required - just use a valid Linkedin account! Programmatically send messages, get

Tom Quirk 918 Dec 29, 2022
Finds Jobs on LinkedIn using web-scraping

Find Jobs on LinkedIn ?? This program finds jobs by scraping on LinkedIn ??‍?? Relies on User Input. Accepts: Country, City, State ?? Data about jobs

Matt 44 Dec 27, 2022
Easy-apply-bot - A LinkedIn Easy Apply bot to help with my job search.

easy-apply-bot A LinkedIn Easy Apply bot to help with my job search. Getting Started First, clone the repository somewhere onto your computer, or down

Matthew Alunni 5 Dec 9, 2022
A Python Library to interface with Flickr REST API, OAuth & JSON Responses

Python-Flickr Python-Flickr is A Python library to interface with Flickr REST API & OAuth Features Photo Uploading Retrieve user information Common Fl

Mike Helmick 40 Sep 25, 2021
Full-featured Python interface for the Slack API

This repository is archived and will not receive any updates It's time to say goodbye. I'm archiving Slacker. It's been getting harder to find time to

Oktay Sancak 1.6k Dec 13, 2022
A Python Library to interface with Tumblr v2 REST API & OAuth

Tumblpy Tumblpy is a Python library to help interface with Tumblr v2 REST API & OAuth Features Retrieve user information and blog information Common T

Mike Helmick 125 Jun 20, 2022
TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API

TeslaPy - A Python implementation based on unofficial documentation of the client side interface to the Tesla Motors Owner API, which provides functiona

Tim Dorssers 233 Dec 30, 2022
⛑ REDCap API interface in Python

REDCap API in Python Description Supports structured data extraction for REDCap projects. The API module d3b_redcap_api.redcap.REDCapStudy can be logi

D3b 1 Nov 21, 2022
A Python package designed to help users of Cisco's FMC interface with its API.

FMCAPI was originally developed by Dax Mickelson ([email protected]). Dax has moved on to other projects but has kindly transferred the ownership of

Mark Sullivan 66 Dec 13, 2022
A client interface for Scrapinghub's API

Client interface for Scrapinghub API The scrapinghub is a Python library for communicating with the Scrapinghub API. Requirements Python 2.7 or above

Scrapinghub 184 Sep 28, 2022
A delightful and complete interface to GitHub's amazing API

ghapi A delightful and complete interface to GitHub's amazing API ghapi provides 100% always-updated coverage of the entire GitHub API. Because we aut

fast.ai 428 Jan 8, 2023
Coinbase Pro API interface framework and tooling

neutrino This project has just begun. Rudimentary API documentation Installation Prerequisites: Python 3.8+ and Git 2.33+ Navigate into a directory of

Joshua Chen 1 Dec 26, 2021
A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API

PytomicDEX Makerbot A Terminal User Interface (TUI) for automated trading with Komodo Platform's AtomicDEX-API Install sudo apt install wget curl jq g

null 6 Aug 25, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API.

alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API. It allows rapid trading algo development easily, with support for both REST and streaming data interfaces

Alpaca 1.5k Jan 9, 2023
WhatsApp Api Python - This documentation aims to exemplify the use of Moorse Whatsapp API in Python

WhatsApp API Python ChatBot Este repositório contém uma aplicação que se utiliza

Moorse.io 3 Jan 8, 2022
A Python interface to AFL, allowing for easy injection of testcases and other functionality.

Fuzzer This module provides a Python wrapper for interacting with AFL (American Fuzzy Lop: http://lcamtuf.coredump.cx/afl/). It supports starting an A

Shellphish 614 Dec 26, 2022
A Python interface module to the SAS System. It works with Linux, Windows, and mainframe SAS. It supports the sas_kernel project (a Jupyter Notebook kernel for SAS) or can be used on its own.

A Python interface to MVA SAS Overview This module creates a bridge between Python and SAS 9.4. This module enables a Python developer, familiar with

SAS Software 319 Dec 19, 2022