预测不再适用于 LinkedIn API 202301 中的 /posts

rei*_*kje 5 linkedin-api

我们正在 LinkedIn Rest API 中按作者获取所有帖子。我们正在使用projection来丰富author名称和徽标等内容。这是查询:

curl "https://api.linkedin.com/rest/posts?author={MY_ORG}&q=author&count=50&projection=(elements(*(*,author~(vanityName,localizedName,logoV2(*,cropped~:playableStreams(*,elements*(identifiers*(identifier))))))))" \
   -H "LinkedIn-Version: 202212" \
   -H "Authorization: .."
Run Code Online (Sandbox Code Playgroud)

这工作正常,但是如果我更改为LinkedIn-Version: 202301我会得到以下响应:

{
  "status": 400,
  "code": "ILLEGAL_ARGUMENT",
  "message": "projection parameter is not allowed for this endpoint"
}
Run Code Online (Sandbox Code Playgroud)

这有记录在任何地方吗?我如何获取作者的详细信息?

Kap*_*ard -1

您可以查看返回的作者字段并确定它是否具有以下格式:

人URN:/^urn:li:person:[a-z0-9]+$/i

组织瓮:/^urn:li:organization:[0-9]+$/

对于组织,请使用组织查找 API不能使用组织端点

对于使用个人资料 API 的人员