'Getting Internal Server error when posting ugc posts with video on Linkedin Profile

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

BODY:

  "author": "urn:li:person:<person-urn>",
  "lifecycleState": "PUBLISHED",
  "specificContent": {
    "com.linkedin.ugc.ShareContent": {
      "shareCommentary": {
        "attributes": [],
        "text": "This is a test video post"
      },
      "shareMediaCategory": "VIDEO",
      "media": [
        {
          "description": {
            "attributes": [],
            "text": ""
          },
          "media": "urn:li:digitalmediaAsset:<video-urn>",
          "status": "READY",
          "thumbnails": [],
          "title": {
            "attributes": [],
            "text": ""
          }
        }
      ]
    }
  },
  "visibility": {
    "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
  }
}

When trying this post, I am getting an Internal Server Error.

{"message":"Internal Server Error","status":500}

What should be the issue ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source