Search code examples
linkedin-api

Create UGC Post with Video Asset with LinkedIn V2 API


I'm trying to create a UGC post with video asset. I'm able to upload the video and get the media id. but when I'm trying to create the UGC post with the media id, I'm getting a permission error:

urn:li:developerApplication: does not have permission to create ugc posts

Although I am able to create UGC post with an image without any errors.

api url: https://api.linkedin.com/v2/ugcPosts

request budy:

{ "author":"urn:li:organization:", "lifecycleState":"PUBLISHED", "specificContent":{ "com.linkedin.ugc.ShareContent":{ "media":[ { "description": { "attributes":[], "text":"Testing video upload." }, "media":"urn:li:digitalmediaAsset:", "status":"READY", "thumbnails":[], "title": { "attributes":[], "text":"" } } ], "shareCommentary":{ "attributes":[], "text":"Testing video upload." }, "shareMediaCategory":"VIDEO" } }, "targetAudience":{ "targetedEntities":[] }, "visibility":{ "com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC" } }


Solution

  • Apparently only a few / whitelisted apps can create video UGC posts: https://stackoverflow.com/a/54934631/7844946