Reading Time: 6 minutes

Of all the professional networks available LinkedIn has clearly taken the lead with more than 120 million members. Do you use LinkedIn? Most likely you do! That’s why we thought it’s important to have a Cloud Connector to interact with LinkedIn and take advantage of its social power.

Why integrate with LinkedIn?

I almost hear you saying: “LinkedIn seems interesting but what can I do with it?”, here are just a few things you can do with it:

  • Use LinkedIn contact data to enrich your companies directory information
  • Integrate with your applicant tracking system: perhaps run a specific query periodically to fill a pipeline of possible candidates for a given position or as you open a new position define certain keywords and use them to run a search on LinkedIn and gather potential applicants automatically (see below for a sample query).
  • Automatically sync your LinkedIn contacts with another online directory such as Gmail
  • Push out content (blog posts, yammer updates) to LinkedIn

LinkedIn Cloud Connector

latest report
Learn why we are the Leaders in API management and iPaaS

The LinkedIn Cloud Connector has been developed to help you interact with LinkedIn public API. You can, for example, retrieve your contacts, get your network updates, send invites, search for people and much more.

Using the LinkedIn Cloud Connector is pretty straightforward. First you need to declare this namespace in your Mule configuration file:

Note that the schema URI does not exist. Instead, the xsd file is packaged inside the LinkedIn Cloud Connector JAR file under /META-INF/mule-linkedin.xsd and is referenced by the /META-INF/spring.schemas file which maps the namespace URI with the physical location of the schema file.

Then set up the connector with your API key and secret which you can obtain by registering your application in the LinkedIn’s developer site::

Let’s say you want to search for people working at MuleSoft and get their published Twitter accounts as well as their last names, sounds difficult? Not really:

What now? Wouldn’t you want to send them an invite to join your network? This is how you do it:

Finally you most likely want to update your LinkedIn status and also share it in Twitter telling others how much you enjoyed this post:

These are just a few operations of the 20+ the LinkedIn Cloud Connector offers you. For a complete list check the online documentation.

Authenticating with OAuth

Explaining what OAuth is is beyond the scope of this post but you can check this entry if you need more background on this topic. This Connector is intended to be used in Web based application since OAuth requires user interaction through a Web browser. The OAuth OAuth authentication flow was developed using the new Mule DevKit which facilitates writing OAuth-enabled Cloud Connectors. The first time an operation that requires authentication is invoked the browser will be redirected to a LinkedIn site where the user can authorize your application.

I will leave the explanation of how to develop a OAuth-enabled Cloud Connector using the new Mule DevKit for a later post due to space restrictions but in the mean time you can check the online documentation here.

Want to try out LinkedIn Cloud Connector?

Make sure you have this repository configured in your pom.xml:

and then add the LinkedIn Cloud Connector Maven dependency:

   <dependency>
     <groupId>org.mule.modules</groupId>
     <artifactId>mule-module-linkedin</artifactId>
     <version>1.0</version>
   </dependency>

If you have any questions I’ll be happy to get back to you. Please leave your comments or questios here or in the forums.

follow: @federecio @mulejockey