I want any users with linkedIn profile to have ability to share posts from my app to their LinkedIn pages. The problem is that I need URN of user as required field, but I can’t receive it
I get auth code with https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=${clientId}&redirect_uri=${redirectUri}&state=123456&scope=profile%20r_emailaddress%20w_member_social%20openid
, in scope I put all posible options from OAuth 2.0 scopes,
after it I run https://www.linkedin.com/oauth/v2/accessToken?grant_type=authorization_code&client_id=${clientId}&client_secret=${clientSecret}&code=${authCode}&redirect_uri=${redirectUri} to get access_token, next step is https://api.linkedin.com/v2/userinfo with header Authorization: Bearer access_token’ and in response I get:
{
“serviceErrorCode”: 100,
“message”: “Not enough permissions to access: GET /userinfo”,
“status”: 403
}
How to solve this problem?
Anatolii Landyshev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.