I set up an app on linkedIn. Set up and tested code to return an access token. Which all worked fine. I tried to get basic profile data and it says I do not have proper access rights. I gave the app all basic permission other than write posts so I am at a loss for why nothing is being returned.
The error:{"serviceErrorCode":100,"message":"Not enough permissions to access: GET /me","status":403}
My code is below.THETOKENWOULDBEHERE in the live code is the token returned by the oauth process. If anyone has any insights it would be appreciated.
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.linkedin.com/v2/me");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-RestLi-Protocol-Version:2.0.0','x-li-format: json','Authorization: Bearer *THETOKENWOULDBEHERE*'));
$response = curl_exec($ch);
curl_close($ch);
print_r($response);
r_liteprofile
and/orr_emailaddress
scopes? – ficuscrr_basicprofile
r_emailaddress
andrw_company_admin
with the basic account it seems you only have access to 4 and I requested the 3 that looked to make sense. Do I need to request access to those others? – kengTWr_basicprofile
is'nt an option. – ficuscrr_liteprofile
. basic is an option and I didn't see lite as an option but I'll give it a shot. – kengTW