linkedin API中的状态为403的权限错误

问题描述 投票:0回答:1

[当尝试调用Linkedin的“通过VanityName查找个人资料” API(https://docs.microsoft.com/en-us/linkedin/shared/integrations/people/profile-vanity-name-api)时,出现以下错误:

{
    "serviceErrorCode": 100,
    "message": "Not enough permissions to access: GET-vanityName /people",
    "status": 403
}

我按照以下步骤生成了授权令牌(参考:https://docs.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow

  1. 使用https://www.linkedin.com/oauth/v2/authorization?response_type=code&client_id=xxxxxx&redirect_uri=yyyy&state=fooobar&scope=r_liteprofile%20r_emailaddress%20w_member_social%20r_basicprofile获得授权码

  2. 通过调用accessToken API:https://www.linkedin.com/oauth/v2/accessToken将上面步骤中收到的代码与授权令牌交换,其中包含文档中提到的数据和(包括授权代码)

  3. 用标题中的授权令牌调用https://api.linkedin.com/v2/people?q=vanityName&vanityName=usernameabcd,并收到错误:

{“ serviceErrorCode”:100,“ message”:“权限不足,无法访问:GET-vanityName / people”,“状态”:403}

要访问此vanityName API,在生成授权代码(步骤1)时是否还需要提及其他“范围”?所有范围的列表在哪里?

正如我在API文档本身中看到的那样,对此API的访问受到限制,但是我们如何申请该访问?

linkedin linkedin-api linkedin-jsapi
1个回答
0
投票

好吧,这些API似乎受到Microsoft的高度保护,它们并没有过度访问它。该API端点是“合规性API”的一部分。我试图访问它,但没有成功。这里的问题是,您不能要求正确的访问范围,因为您的应用程序很可能不符合此条件。

© www.soinside.com 2019 - 2024. All rights reserved.