Search code examples
linkedin-api

Linkedin asset complete_multipartUpload api throws 401


I'm trying to upload a video using multipart linkedin v2 asset upload api. After uploading all parts successfully. When i'm trying to complete the upload, it throws 401 error response.

Request

curl -v -X POST -H "Content-Type:application/json" -H "X-RestLi-Protocol-Version:2.0.0" "https://api.linkedin.com/v2/assets?action=completeMultiPartUpload&oauth2_access_token=xxxx" --data '{"completeMultipartUploadRequest":{"metadata":"abcdhjf lmmfk45322jnmdfmndk","partUploadResponses":[{"httpStatusCode":200,"headers":{"ETag":"d8b472e8f16603b7b6ca4a0cbb1653eb"}},{"httpStatusCode":200,"headers":{"ETag":"30a52d0e398863a1e47418c468ec8929"}},{"httpStatusCode":200,"headers":{"ETag":"92431e62823450eeb0def68024872882"}},{"httpStatusCode":200,"headers":{"ETag":"e6a9c6eacffd9d1f2532eac83d3208e3"}},{"httpStatusCode":200,"headers":{"ETag":"e6bfcf0807a71d63b48d58545101852c"}},{"httpStatusCode":200,"headers":{"ETag":"d355aa0d72c6787e9bfe5f66967c12ba"}},{"httpStatusCode":200,"headers":{"ETag":"1bc89f2c688b6abb970862a3326474fe"}},{"httpStatusCode":200,"headers":{"ETag":"9d89fff03e36ea12e4f0c842d3bb5431"}},{"httpStatusCode":200,"headers":{"ETag":"30f10c2baab55a0185eb396a06b86d39"}},{"httpStatusCode":200,"headers":{"ETag":"e1dc1eac95ab7ef51e38aeb7702b7e4f"}},{"httpStatusCode":200,"headers":{"ETag":"2365a3d1334953209611aef89739e751"}}],"mediaArtifact":"urn:li:digitalmediaMediaArtifact:(urn:li:digitalmediaAsset:abc123,urn:li:digitalmediaMediaArtifactClass:aws-userUploadedVideo)"}}'

Response

{"message":"com.linkedin.vector.assetmanager.logic.LogicLayerException: Enforced Tenant ACL result: false, for Tenant urn:li:digitalmediaTenant:5 and Method complete_multipartUpload","status":401}

Can anyone help to resolve this?


Solution

  • I had this issue and reached out to LinkedIn. They just told me they fixed it on their end, and when I try to complete my multipart upload requests now, it's working properly.