Toggle menu

LinkedIn

OAuth2 operations are performed against the following OAuth2 endpoints requesting "r_basicprofile"and "r_emailaddress" privileges:

  • Authorization: https://www.linkedin.com/uas/oauth2/authorization
  • Token Retrieval: https://www.linkedin.com/uas/oauth2/accessToken
  • User details acquisition: https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)?format=json

Setup

A client specific LinkedIn app must be created that allows access to the "r_basicprofile" and "r_emailaddress" privileges in order to access LinkedIn services and query user profile data.

Create the LinkedIn app from the "My Apps" section of https://developer.linkedin.com.

The new app will need "r_basicprofile" and "r_emailaddress" checking under "Default Application Permissions". The Authentication Worker's reentry method should be entered as an "Authorized Redirect URL" in the OAuth2.0 section eg https://mywebsite.com/apiserver/auth/http/reentry.

You will then have access to the "Client ID" and "Secret ID" needed below.

Parameters

As well as the parameters described in Base Provider Parameters, the following must be set in the params object.

NameTypesDescription
clientIdString, requiredThe Client ID from your LinkedIn App
secretString, requiredThe Secret ID from your LinkedIn App

User Profile Data

Requested fields: idfirstNamelastNameemailAddress.

We request the following information from LinkedIn about a user. The properties are automatically mapped to the Authentication Worker's UserProfile class. These properties are then mapped to actual fields in a site user's profile, following the mappings set up in the userProfileToObjectFieldMapping property of the Worker Configuration Properties.

LinkedIn PropertyMapped ToComments
idUNIQUEIDLinkedIn's unique user identifier.
n/aTITLENot supplied by LinkedIn
firstNameFORENAMES 
firstNamePREFERREDNAME 
lastNameSURNAME 
emailAddressEMAIL 

See the Linking Providers, Account and Profile Management article for information about how profiles and email addresses are updated.

Example

{
    "providerName": "linkedin", 
    "providerDisplayName": "LinkedIn", 
    "type": "linkedin", 
    "userPrefix": "LI_", 
    "params": {
        "clientId": "000000000000000", 
        "secret": "abcdef1234567890", 
        "checkConsentToStoreData": true, 
        "failIfConsentNotGiven": true
    }
}

Last modified on November 22, 2022

Share this page

Facebook icon Twitter icon email icon

Print

print icon