Skip to main content

Django Middleware for LinkedIn API

Project description

Django LinkedIn Middleware

PyPI Build Status

Connect to the LinkedIn API.


$ pip install django-linkedin-middleware

Just add django-linkedin-middleware.middleware.LinkedinMiddleware to your MIDDLEWARE.


In the request session will be found 3 differents label :

  • linkedin_firstName for the user first name
  • linkedin_lastName for the user last name
  • linkedin_headline for the user headline

In your HTML, you can directly add these label to display the data.


Linkedin Configuration

You need to create an application on the linkedin developer pages to to receive your credentials



LINKEDIN_APPLICATION_RETURN_CALLBACK : the callback url (you should add the same url in the linkedin developer page)

LINKEDIN_APPLICATION_PROFILE : a table of different application permissions. Here's a list of the permissions : ['r_basicprofile', 'r_emailaddress', 'rw_company_admin', 'w_share']. You could also add the permission

Application Configuration

PAGES_WITH_LINKEDIN_AUTH_REQUIRED : the list of all pages on which you should force an authentication. By default, it will be all the pages (example : ['*'])

PAGES_WITHOUT_LINKEDIN_AUTH_REQUIRED : the list of all pages on which the authentication is disable.


I only made a middleware for simply connect to linkedin and display information in the session. I based my work on the python-linkedin project.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django_linkedin_middleware-0.1.2.tar.gz (8.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page