Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The People API returns a member's LinkedIn profile, subject to the member's privacy settings.
The service currently provides the following methods:
- get a single profile.
- batch get multiple profiles.
Permissions
| Permission | Description |
|---|---|
| r_dma_admin_pages_content | Retrieve your organization’s posts, comments, reactions, and other engagement data. Retrieve your organization’s pages and their reporting data (including follower, visitor and content analytics). |
See Organization Access Control for more information on company page roles.
Member Data Obfuscation
This DMA API has member data obfuscated depending on whether member has opted into the new DMA privacy setting (opted out by default). When opted in, member data is returned. When opted out, member data is filtered out.
Schema
| Field | Format | Description | Required |
|---|---|---|---|
| id | URN Must be of format urn:li:person:{id}. | The person id | Yes |
| firstName | String | Localizable first name of a member | No |
| localizedFirstName | String | Localized version of the firstName field | No |
| lastName | String | Localizable last name of a member | No |
| localizedLastName | String | Localized version of the lastName field | No |
| maidenName | String | Localizable maiden name of a member | No |
| localizedMaidenName | String | Localized version of the maidenName field | No |
| headline | String | Localizable headline of choosing to be put on the profile; can be title but may also be anything that suits the purpose | No |
| localizedHeadline | String | Localized version of the headline field | No |
| vanityName | String | The vanity name for the member (i.e. public URL) | No |
| profilePicture.displayImage | Image | Metadata about the member’s picture in the profile | No |
Get Profile
This method allows for fetching a single LinkedIn member profile given a person id.
Sample Request
GET https://api.linkedin.com/rest/dmaPeople/(id:123)?fields=id,firstName,lastName,maidenName,localizedFirstName,localizedLastName,localizedMaidenName,vanityName,headline,localizedHeadline,profilePicture
Sample Response
{
"id": "123",
"firstName": {
"localized": {
"en_US": "MyFirstName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedFirstName": "MyFirstName",
"lastName": {
"localized": {
"en_US": "MyLastName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedLastName": "MyLastName",
"maidenName": {
"localized": {
"en_US": "MyMaidenName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedMaidenName": "MyMaidenName",
"headline": {
"localized": {
"en_US": "This is my headline"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedHeadline": "This is my headline",
"vanityName": "myVanityName",
"profilePicture": {
"displayImage": {
"downloadUrl": "https://media.licdn.com/dms/image/D4E03AQEqeCvWIJKq4g/profile-displayphoto-shrink_400_400/0/1675118916417?e=1705536000&v=beta&t=Mdj0dzluNN0mEVlNZT0XBSNlKif7ZMcXAn1eJX3YPpE",
"downloadUrlExpiresAt": 1705536000000,
"status": "AVAILABLE"
}
}
}
Batch Get Profile
This method allows for fetching multiple LinkedIn member profiles given person ids.
Sample Request
GET https://api.linkedin.com/rest/dmaPeople?ids=List((id:123),(id:456))&fields=id,firstName,lastName,maidenName,localizedFirstName,localizedLastName,localizedMaidenName,vanityName,headline,localizedHeadline,profilePicture
Sample Response
In this example, first member is opted into new DMA setting (and hence member data is returned) and second member is opted out (and hence member data is obfuscated)
{
"results": {
"(id:123)": {
"id": "123",
"firstName": {
"localized": {
"en_US": "MyFirstName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedFirstName": "MyFirstName",
"lastName": {
"localized": {
"en_US": "MyLastName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedLastName": "MyLastName",
"maidenName": {
"localized": {
"en_US": "MyMaidenName"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedMaidenName": "MyMaidenName",
"headline": {
"localized": {
"en_US": "This is my headline"
},
"preferredLocale": {
"country": "US",
"language": "en"
}
},
"localizedHeadline": "This is my headline",
"vanityName": "myVanityName",
"profilePicture": {
"displayImage": {
"downloadUrl": "https://media.licdn.com/dms/image/D4E03AQEqeCvWIJKq4g/profile-displayphoto-shrink_400_400/0/1675118916417?e=1705536000&v=beta&t=Mdj0dzluNN0mEVlNZT0XBSNlKif7ZMcXAn1eJX3YPpE",
"downloadUrlExpiresAt": 1705536000000,
"status": "AVAILABLE"
}
}
},
"(id:456)": {
"id": "private"
}
}
}
API Error Details
| HTTP Status Code | ERROR MESSAGE | DESCRIPTION | ERROR RESOLUTION |
|---|---|---|---|
| 401 | EMPTY_ACCESS_TOKEN | Empty or expired oauth2 access token | Use a valid member access token |
| 401 | INVALID_ACCESS_TOKEN | Invalid oauth2 access token for the given member attempting to be fetched | Use a valid member access token matching member being fetched |
| 403 | ACCESS_DENIED | Not enough permissions to access people data | Make sure your developer application is provisioned with the necessary permissions |
| 403 | FORBIDDEN | Invalid member id | Make sure you are requesting an existing member |
| 422 | FAILED_VALIDATION_CONDITION | Request fails structure validation. / Missing required fields in the request | Make sure all required fields are passed and follow valid structure |
| 500 | INTERNAL_SERVER_ERROR | Internal server-side error | N/A |
