Start a new topic

Getting LinkedIn user basic profile with authentication using MIC

Hi Team,


We are using Mobile Identity Connect - OAuth2 for LinkedIn Authentication in my application. We mapped the first-name and last-name for allowed attributes. After successful login when we check user social-identity value we are not getting first-name and last-name of the LinkedIn user. 


Could you please help me in this, how we can get basic user profile attributes of LinkedIn with authentication?

Capture.PNG
(62.3 KB)

Hello Himanshu,


Can you send me the KID of the application that you're trying to set this up for? Please send it to billy@kinvey.com so that it is not published in a public forum.


Thanks,


Billy

Hi Himanshu,

I am sharing my response from your ticket to the forum post here, so that it is visible to others as well:


You have set the following User Id Endpoint in MIC: 


https://api.linkedin.com/v1/people/~?format=json


Although LinkedIn have stated in their documentaion that the returned fields are first-name, last-name ..., the fields in JSON are actually returned in camelCase from the LinkedIn API:

{
    "id": ... ,
    "firstNmae": ... ,
    "lastName": ... ,
    "headline": ...
    
}


Therefore, please add in the allowed attributes in MIC firsrtName and lastName in order to be saved in the user profile in Kinvey. If you want to get and save additional fields from the basic profile, please state the required fields as noted in LinkedIn documentation in the User Id Endpoint:

https://api.linkedin.com/v1/people/~:(id,num-connections,industry,positions,public-profile-url,first-name,last-name,picture-url)?format=json


Then you would need to set the same fields as allowed attributes but in camelCase format for properties that have "-".


Regards

Martin


1 person likes this
Login or Signup to post a comment