Integrating with LinkedIn using Mule ESB LinkedIn Connector

13
Integrating with LinkedIn using Mule ESB LinkedIn Connector Prepared By: Rupesh Sinha

Transcript of Integrating with LinkedIn using Mule ESB LinkedIn Connector

Integrating with LinkedIn

using Mule ESB LinkedIn

Connector

Prepared By: Rupesh Sinha

Overview

What is LinkedIn?

Versions and Assumptions

Configuring LinkedIn

Configuring LinkedIn Connector

Mule Flow for LinkedIn Authentication

Mule Flow for retrieving linked in user profile

What is LinkedIn?

LinkedIn is a business-oriented social networking service

LinkedIn was founded in December 2002 and launched on May 5, 2003

It is mainly used for professional networkingAs of June 2013, LinkedIn reports more

than 259 million acquired users in more than 200 countries and territories

Versions and Assumptions

In this presentation, we are using LinkedIn Connector 1.1.0 Any point Studio Mule ESB Server 3.5.2

To use this application in your project, you will need a

LinkedIn account for testing

You will need to create a new LinkedIn app under

LinkedIn developer apps to be able to communicate with

your LinkedIn account from Mule ESB application

In this presentation, we will be using OAuth2

authentication to connect to LinkedIn using Mule ESB

LinkedIn Connector

Configuring LinkedIn

Go to https://www.linkedin.com/secure/developer

Click on Add new Application

Fill in the form and click on Add Application

Make a note of the consumer key, consumer secret and the

OAuth2 Redirect URL as these will be used during our Mule ESB

application configuration

Click on Done

Configuring LinkedIn Connector

Create a new Mule Application

Click on Global Elements tab in your main flow

Click on Create Button

Select LinkedIn under Connector Configuration group

Add your LinkedIn consumer key value to API Key text box

Add your LinkedIn consumer secret value to API Secret text box

Add “r_basicprofile,r_network” in the scope text box

Click on Oauth tab and specify domain, local port, remote port

and Path values.

The Oauth values should be same as what is configured in

LinkedIn App

A screen shot and sample XML configuration is shown in the

next slide

Mule Flow for LinkedIn Authentication

Configure a flow as shown in the below picture

The XML configuration for this flow is given in the next slide

Deploy your mule application

Hit the following URL on the browser

http://localhost:3300/linkedinconnect

LinkedIn will ask you to authorize your new app to connect to LinkedIn

as shown below.

Provide your username and password

Click on Allow access

You should now see “oauth_token” and “oauth_verifier” values printed

on your browser

Now hot the below URL

http://localhost:3300/getuser

You should now see the user public profile details printed on your

browser in JSON format