You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

LinkedIn API调用返回空elements数组,access_token有效求排查

LinkedIn API请求返回elements数组为空的排查方案

原始请求参数

请求URL:

https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:organization:6829881&sortBy=LAST_MODIFIED&sharesPerOwner=100&start=0&count=9

返回结果

stdClass Object
(
    [paging] => stdClass Object
        (
            [start] => 0
            [count] => 9
            [links] => Array
                (
                    [0] => stdClass Object
                        (
                            [type] => application/json
                            [rel] => next
                            [href] => /v2/shares?count=9&owners=urn%3Ali%3Aorganization%3A6829881&q=owners&sharesPerOwner=100&sortBy=LAST_MODIFIED&start=0
                        )

                )

            [total] => 123
        )

    [elements] => Array
        (
        )

)

排查方向

  • 权限验证:确认access_token包含r_organization_social权限,这是读取组织动态的必要权限。可通过token校验接口查看已授权的权限范围。
  • 参数合理性:检查组织URN是否准确,尝试移除sharesPerOwner=100参数(使用默认值),或调整count为10、start为0重新请求,看是否能返回数据。
  • 内容权限:确认当前token对应的账号是否有权限查看该组织的公开/内部动态,比如是否是组织管理员或已授权的应用用户。
  • API合规性:核对LinkedIn最新API文档,确认/v2/shares端点的参数要求,比如sortBy的有效值是否仍为LAST_MODIFIED,是否有其他必填参数遗漏。
  • 请求头检查:确保请求头包含Authorization: Bearer {access_token}和Content-Type: application/json,避免因头信息缺失导致的权限拦截。

内容的提问来源于stack exchange,提问作者Andrii Marushchak

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 03:45:52