Sign In with LinkedIn
Note
This version of Sign In with LinkedIn has been deprecated as of August 1, 2023. For all Sign In with LinkedIn implementations going forward, please refer to Sign In with LinkedIn using OpenID Connect.
With more than 500 million members worldwide, LinkedIn is the largest and most trusted source of professional identities. Leverage this power to enhance the sign-in experience of your sites and applications.
Use Sign In with LinkedIn to:
- Reduce friction and obtain more sign-ups by allowing members to Sign In with LinkedIn, without having the need to create a new account.
- Minimize the costs and time associated with implementing your own login, identity, profile management, and password management.
- Personalize your sites and applications with the latest member profiles.
New members logging in to your service for the first time will need to follow the Authenticating with OAuth 2.0 Guide. When requesting an authorization code in Step 2 of the OAuth 2.0 Guide, make sure to request the r_liteprofile
and/or r_emailaddress
scopes!
Permission Name | Description |
---|---|
r_liteprofile | Required to retrieve the member's lite profile including their id, name, and profile picture. |
r_emailaddress | Required to retrieve the member's email address. |
After successful authentication, you will acquire an access token that can be used in the next step of the sign-in process.
If your application does not have these permissions, you can add them through the Developer Portal. Select your app from My Apps, navigate to the Products tab, and add the Sign in with LinkedIn product which will grant you r_liteprofile
and r_emailaddress
.
With your newly acquired access token for the authenticated member, you can use the following API request to retrieve the member's profile information. See Lite Profile to learn more about the Lite Profile fields available.
GET https://api.linkedin.com/v2/me
Field Name | Description | Format |
---|---|---|
ID | The member's unique identifier | Person URN |
firstName | Member's first name | Text |
lastName | Member's last name | Text |
profilePicture | Member's profile picture URL | Text |
{
"id":"REDACTED",
"firstName":{
"localized":{
"en_US":"Tina"
},
"preferredLocale":{
"country":"US",
"language":"en"
}
},
"lastName":{
"localized":{
"en_US":"Belcher"
},
"preferredLocale":{
"country":"US",
"language":"en"
}
},
"profilePicture": {
"displayImage": "urn:li:digitalmediaAsset:B54328XZFfe2134zTyq"
}
}
With the member's profile information successfully retrieved, the sign-in process is now complete and your user can continue to enjoy their personalized experience with your site or application.
In order to retrieve the member's profile picture, you will need to use decoration. Use the API request below to retrieve the member's id, first name, last name, and profile picture.
GET https://api.linkedin.com/v2/me?projection=(id,firstName,lastName,profilePicture(displayImage~:playableStreams))
In addition to the member's profile, you may be interested in retrieving the member's email address. The r_emailaddress
permission scope allows usage of the following API:
GET https://api.linkedin.com/v2/emailAddress?q=members&projection=(elements*(handle~))
Field Name | Description | Format |
---|---|---|
handle | The URN representation of a member's handle. | Email Address URN |
{
"handle": "urn:li:emailAddress:3775708763",
"handle~": {
"emailAddress": "hsimpson@linkedin.com"
}
}
Download official Sign In with LinkedIn button images in multiple sizes and formats from the LinkedIn Brand Resources archive for use within your site or application.
Throttle Type | Daily Request Limit (UTC) |
---|---|
Member | 500 Requests |
Application | 100,000 Requests |