Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

permission error while making ugc video post on linkedin

I am trying to create video post on linkedin with new ugc endpoint

there are two steps to create this type of post

1). Upload video asset on linkedin server (done)
2). make post request to ugc endpoint with request body

I have successfully uploaded the video but getting authentication error for ugc post request. error is

{
    "message": "urn:li:developerApplication:<id1> does not have permission to create ugc posts with author: li:member:<id2>",
    "status": 401
}

I am passing the request body as suggested in the linkedin api docs.

{
  "author": "urn:li:person:<id>",
  "lifecycleState": "PUBLISHED",
  "specificContent": {
    "com.linkedin.ugc.ShareContent": {
      "media": [
        {
          "title": {
            "attributes": [],
            "text": "Sample Video Create"
          },
          "description": {
            "attributes": [],
            "text": "Sample Description"
          },
          "media": "urn:li:digitalmediaAsset:<asset_id>",
          "thumbnails": [],
          "status": "READY"
        }
      ],
      "shareCommentary": {
        "attributes": [],
        "text": "Some share text"
      },
      "shareMediaCategory": "VIDEO"
    }
  },
  "visibility": {
    "com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
  },
  "targetAudience": {
    "targetedEntities": [
      {
        "locations": [
          "urn:li:country:us"
        ]
      }
    ]
  }
}

Please suggest how I can solve this problem. From error message it seems like I am not providing some permission. But I am not sure where I am making mistake.

like image 352
sachin jangid Avatar asked Aug 16 '18 13:08

sachin jangid


1 Answers

This is the response I got from the LinkedIn Developer Support:

"Hi Ervin,

Creating video UGC posts is currently a whitelisted feature. There is currently hold on whitelisting new apps for video.

You may continue to create UGC posts that are not video though.

I'll put this on hold until I have more information on when we can whitelist apps again.

Best, Alex"

like image 174
Ervin Kalemi Avatar answered Dec 31 '22 15:12

Ervin Kalemi