OAuth2 Services Setup Project In LinkedIn: Difference between revisions
Damyon Wiese (talk | contribs) (Created page with "=== Setup App in LinkedIn === To setup an OAuth 2 client with LinkedIn, first we need to login to the https://developer.linkedin.com/ LinkedIn Developers page and create...") |
Damyon Wiese (talk | contribs) |
||
Line 31: | Line 31: | ||
Add 3 endpoints as listed below. | Add 3 endpoints as listed below. | ||
<code> | |||
userinfo_endpoint - https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,picture-url)?format=json | userinfo_endpoint - https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,picture-url)?format=json | ||
Line 37: | Line 37: | ||
token_endpoint - https://www.linkedin.com/oauth/v2/accessToken | token_endpoint - https://www.linkedin.com/oauth/v2/accessToken | ||
</code> | |||
[[OAuth2 Services|Back to OAuth 2 Services]] | [[OAuth2 Services|Back to OAuth 2 Services]] |
Revision as of 02:09, 23 May 2017
Setup App in LinkedIn
To setup an OAuth 2 client with LinkedIn, first we need to login to the [LinkedIn Developers page] and create a new app.
Now you have configured your LinkedIn App - you can add the required information to Moodle.
LinkedIn does not have a "template" in Moodle so we will need to configure it as a "Custom OAuth 2 Service". From the "Site administration > Server > OAuth 2 services" page click on "Create new custom service".
Use "LinkedIn" as the name (This is displayed on the login page).
Enter your client id and secret for the LinkedIn App that you created earlier.
For the "Scopes included in a login request" and "Scopes included in a login request for offline access" use "r_basicprofile r_emailaddress" which means fetch basic profile information as well as the users email address.
Enter a url to a logo image.
Check the box for "Show on login page".
Save the details and you should be returned to the list of OAuth 2 Services.
We still need to provide information on the mappings between linked in user fields and moodle fields as well as the URL's to access the LinkedIn APIs.
First we will setup the API URL's.
Click on the "Configure Endpoints" icon for the LinkedIn service.
Add 3 endpoints as listed below.
userinfo_endpoint - https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,picture-url)?format=json
authorization_endpoint - https://www.linkedin.com/oauth/v2/authorization
token_endpoint - https://www.linkedin.com/oauth/v2/accessToken