- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 04-02-2020 11:59 PM
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).
![]()
Configure OAuth Profile in ServiceNow:
Steps —
Navigate to SystemOAuth > Application Registry and click on NEW select Connect to a third part OAuth provider.
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
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.
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.
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.
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)
- 3,763 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hey Prashant,
It must be. You just need to get application in LinkedIn developer account