This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

LinkedIn Connector

The LinkedIn connector allows you to access the LinkedIn API, an online social networking service and micro blogging service that enables its users to create applications to build their professional identity online and stay in touch with colleagues and classmates. It also discovers professional opportunities, business deals, and new ventures. The LinkedIn connector uses the LinkedIn API to perform operations such as inviting people to connect and viewing jobs etc. The following sections describe how to perform various operations with the LinkedIn connector.

Connecting to LinkedIn

To use the LinkedIn connector, add the <linkedIn.init> element in your configuration before any LinkedIn operations. This method contains all the common attributes and parameters needed for the connector functions. The connector includes a check to see the value for the apiUrl. If the value for the apiUrl is not given, it is set to https://api.linkedin.com/  by default.  

init
<linkedin.init>
     <apiUrl>https://api.linkedin.com</apiUrl>
     <accessToken>AQV068KoSLBPT8UeiEdMufTAp6t78tvE1B8UAdqtOFIFkGIvCfLbxDlkLfnA5dLE2UYsb</accessToken>
</linkedin.init>
Re-using LinkedIn configurations

For best results, save the LinkedIn configuration as a local entry. You can then easily reference it with the configKey attribute in your LinkedIn operations. For example, if you had saved the above <linkedin.init> entry as a local entry named LinkedInConfig, you could reference it from an operation like getLinkedInProfile as follows:

<linkedin.getLinkedInProfile configKey="LinkedInConfig" />
Properties
  • apiUrl: URL of the LinkedIn API. This is an optional parameter with the default value  https://api.linkedin.com
  • accessToken: The access token allows making requests to the API on behalf of a user.

Getting the access token

getAccessToken
<linkedin.getAccessToken>           
    <code>AQTJGP-8wzSboLNt7O_WtjQbO7szR0v712aKhvi3WsPbUL7YMj3Q9Ytzd5b-pA8qq19NcmeRXCF0aP17XHgKEAI5u8wm7xnQW0WFzPMD14Fb6b9Sb9U</code>
    <redirectUri>http://www.google.com</redirectUri>
    <clientId>75f11ns8b820m6</clientId>
    <clientSecret>THjXHLKQMpuZZ1ZV</clientSecret>
</linkedin.getAccessToken>
Properties
  • code: The authorization code.

  • redirectUri: The redirect_uri that you passed to get the authorization code.

  • clientId: Value of your API key given when you registered your application with LinkedIn.

  • clientSecret: Value of your secret key given when you registered your application with LinkedIn.

Related LinkedIn documentation

https://developer.linkedin.com/documents/authentication

Performing operations on LinkedIn

The following pages describe how to perform various operations with the connector. For general information on using connectors and their operations in your ESB configurations, see Using a Connector. To download the connector, go to https://store.wso2.com/store/assets/esbconnector/linkedin, click the LinkedIn connector, and then click Download Connector. Then you can add and enable the connector in your ESB instance.

 

2329

 

2678