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

LinkedIn Video API initializeUpload报错UNPROCESSABLE_ENTITY求助

关于LinkedIn Videos API上传视频时的URN类型错误问题

从昨日起,我在使用LinkedIn新Videos API和Posts API上传视频时开始遇到错误,此前迁移后该功能一直正常运行。收到的错误信息如下:

{
  "description": "owner value urn:li:organization:<id> is of type organization. Allowed URN types are company, member",
  "input": {
    "inputPath": {
      "fieldPath": "/initializeUploadRequest/owner"
    }
  },
  "code": "UNPROCESSABLE_ENTITY"
}

根据官方文档,owner仅支持urn:li:person:<id>或urn:li:organization:<id>格式的URN,因此我使用的owner格式看似正确。发起的请求代码如下:

const url = 'https://api.linkedin.com/rest/videos?action=initializeUpload';
const headers = {
   Authorization: `Bearer <token>`,
  'LinkedIn-Version': '202206',
  'X-RestLi-Protocol-Version': '2.0.0',
};
const initializeUploadRequest = {
      owner: 'url:li:organization:<id>',
      fileSizeBytes: <size>,
      uploadThumbnail: true,
      uploadCaptions: false
}
return await axios.post(url, { initializeUploadRequest }, { headers });

近期有谁遇到过类似问题吗?

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.24 10:24:11