The CreatorCon Call for Content is officially open! Get started here.

Vivek Verma
Giga Sage

find_real_file.png

 

Create an Application in LinkedIn developer account: We need to create an Application in LinkedIn developer account to get the following information — Application credentials, and Permissions (Link)

( ServiceNow as a consumer and Linkedin as Provider).

find_real_file.pngfind_real_file.png 

Configure OAuth Profile in ServiceNow:

Steps —

Navigate to SystemOAuth > Application Registry and click on NEW select Connect to a third part OAuth provider.

find_real_file.png

 

Complete the form,

The client id and Client secret — You need to copy and paste it from the LinkedIn Developer Application.

Default Grant Type — Authorization Code

Authorization URL — https://www.linkedin.com/oauth/v2/authorization

Token URL — https://www.linkedin.com/oauth/v2/accessToken

(LinkedIn API Docs)

To get the Authorization permissions, we need to mention all the three permissions from the Linkedin Application to the OAuth Entity Scopes.

And same for the Automatically created default OAuth Entity Profile.

find_real_file.png

find_real_file.png

 

 find_real_file.png

Create Rest Messages in ServiceNow:

To get the token and Profile detail, We need to create a get rest message.

steps —

Open System Webservices> Outbound> Rest Message

Click New,

Complete the form,

Endpoint URL: GET https://api.linkedin.com/v2/me

Authentication type : OAuth2.0

OAuth profile: LinkedSN default_profile (already created in previous steps.)

After submitting the form a default Get message will be created.

find_real_file.png

Now Click on Get OAuth Token.

A new window will open, Where you need to provide Your Linked Account Credentials.

On the successful attempt, The Access token will be generated, and the Validity of token will show as Info message on the form.

Now, open the default Get Method, Click on Test. A new window pop-up showing the Test Run results; in the response, we can find the integrated profile details, i.e., First name, Last name, Language.

find_real_file.png

Bonus — To create a post on LinkedIn,

Create Post HTTP method,

Complete the form,

End Point: https://api.linkedin.com/v2/ugcPosts

Content: {

“author”: “urn:li:person:<<Put the id which you get from the previous get method>>”,

“lifecycleState”: “PUBLISHED”,

“specificContent”: {

“com.linkedin.ugc.ShareContent”: {

“shareCommentary”: {

“text”: “This is Test Post!”

},

“shareMediaCategory”: “NONE”

}

},

“visibility”: {

“com.linkedin.ugc.MemberNetworkVisibility”: “PUBLIC”

}

 

Medium Article Link -- (Link)

 

Comments
PrashantLearnIT
Giga Sage

HI @Vivek Verma 

 

Will it work now also?

 

Thanks

Prashant

Vivek Verma
Giga Sage

Hey Prashant,

It must be. You just need to get application in LinkedIn developer account

Version history
Last update:
‎04-02-2020 11:59 PM
Updated by: