Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
553 views
in Technique[技术] by (71.8m points)

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...