我获得了访问令牌(范围:r_basicprofile r_emailaddress w_share)也尝试使用r_fullprofile。
我基于此文档授权: https://developer.linkedin.com/docs/oauth2
接下来,我向https://api.linkedin.com/v2/me端点
发出请求curl -H "Authorization: Bearer ACCESS_TOKEN"
-H "Accept: application/json"
-H "Content-Type: application/json"
获得回复:
{
"serviceErrorCode": 100,
"message": "Not enough permissions to access /me GET ",
"status": 403
}
真的不知道为什么?
答案 0 :(得分:2)
事实证明,使用API的新v2,您需要使用r_liteprofile
和r_emailaddress
范围。
https://docs.microsoft.com/en-us/linkedin/consumer/integrations/self-serve/sign-in-with-linkedin
答案 1 :(得分:1)