Table of contents

Unofficial Content

This article explains how to authenticate your users with LinkedIn using GeneXus Access Manager (GAM).

1. Enter to the GAM's Backend and go to the Authentication Types section. Create a new OAuth 2.0 Authentication Type and in General section define basic information like: Name, Description, Images (optional), etc.

2. In the Configuration section you need to define the following for the General, Authorization, Token and User Information tab:

General

Client ID:     client_id       Value: <clientid>
Client Secret: client_secret   Value: <clientsecret>
Redirect URL:  redirect_uri    Value: https://<server>/webapp

Authorization

URL: https://www.linkedin.com/oauth/v2/authorization
Response type:  response_type    Value: code
Scope:          scope            Value: r_emailaddress+r_liteprofile
State:          state
Include ClientID and RedirectURL
Response:
Access code TAG: code
Error description TAG: error_description

Token

URL: https://www.linkedin.com/oauth/v2/accessToken
Header Cotent type: Content-type   Value: application/x-www-form-urlencoded
Grant type:         grant_type     Value: authorization_code
Include All
Response:
Access token TAG: access_token
Expires in TAG: expires_in
Refresh Token TAG: Not available for this Provider. When the token expires, it cannot be refreshed.
Error description TAG: error_description
Validate external token = True   // When the token expires, the GAM session ends.
Refresh token URL = leave it empty. Uses the same URL used to ask for a Token. 

User Information

URL:  https://api.linkedin.com/v1/people/~:(id,email-address,first-name,last-name,headline,picture-url)
Method: Get
Header Content type: Content-type    Value: application/json;charset=utf-8
NOTHING is included
Additional parameters: format=json
Email TAG: emailAddress
External ID TAG: id
Name TAG:  emailAddress
First name TAG: firstName
Last name TAG: lastname
URL image TAG: pictureUrl
Error description TAG: error_description

3. Click on the following link to see LinkedIn documentation about OAuth 2.0 protocol, and more information about the configuration.

Availability

As of GeneXus 15 Upgrade 11.

See Also

GAM - OAuth 2.0 Authentication Type

    

Last update: April 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant