Tuesday, October 20, 2015

Python LinkedIn REST API Implementation

LinkedIn using OAuth Version 2.0 it's different process compare with OAuth Version 1.0. Newer version is more easy to implement we don't really need to create parameter with oauth_ prefix and generate signature on client side, for more information about oauth version 2.0 we can refer to official oauth page http://oauth.net/2/.

All request should use https protocol and redirect url must be accessible if not we can't get code for generate access token. The step is simple just 2 step only.

1. Generate grant access url, from here we will redirected to our redirect url and we will get code for authorization code
2. Generate access token using that code with POST method and we will get token access with specific time expired

We can use that token access to call API to provider. Token access will expired in specified time and we need to renew access token with both step.

You can grab pyLinkedinAPI from my github repository https://github.com/amru-rosyada/pyLinkedinAPI

Please if you use it, don't forget to give us feedback. Next project I will try to implement Facebook, G+, Instagram and Flickr as far as I have little time to make it :D

No comments:

Post a Comment