I am developing an application that integrates some related functions, and we are testing API version 2.
But when we try to request something from the API, we get an error that says the following:
{"serviceErrorCode":100,"message":"Not enough permissions to access /me GET ","status":403}
The challenge we make is:
https://api.linkedin.com/v2/me
I am attaching our OAuth2 code like this, after getting it from the corresponding URL:
request.AddHeader("authorization", "Bearer " + authCode);
Here is the complete request we make for the associated API:
var client = new RestClient("https://api.linkedin.com/v2/");
var request = new RestRequest("me", Method.GET);
request.AddHeader("authorization", "Bearer " + authCode);
var response = client.Execute(request);
ViewBag.Message = "output: " + response.Content;
When connecting, we use OAuth2 to authenticate our user token and request all permissions with:
&scope=r_basicprofile%20r_emailaddress%20rw_company_admin%20w_share
Link to related documentation:
https://developer.linkedin.com/docs/guide/v2
In addition, I tested the OAuth2 token with the API version 1, and it works great for everything we throw at it.
, , , , .
: - , , - V2 API, .