Tikam Chand
Tikam Chand

Reputation: 96

Field Value validation failed in REQUEST_BODY: Data Processing Exception while processing fields [/author] on linkedin ugcPost

Getting Error: Field Value validation failed in REQUEST_BODY: Data Processing Exception while processing fields [/author]

I have the "w_organization_social" permission in my app. I'm successfully getting the access token.

Can anyone help me what's going wrong?

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

Body:

{
    "author":"urn:li:person:<id>",
    "lifecycleState":"PUBLISHED",
    "specificContent": {
        "com.linkedin.ugc.ShareContent": {
            "shareCommentary": {
                "text":"Hello world"
            },
            "shareMediaCategory": "VIDEO",
            "media":[{
                "status":"READY",
                "description": {
                    "text":"hello world"
                },
                "media":"urn:li:digitalmediaAsset:<asset_id>",
                "title":{
                    "text":"hello world"
                }
            }]
        }
    },
    "visibility":{
        "com.linkedin.ugc.MemberNetworkVisibility":"PUBLIC"
    }
}

Response:

{
    "serviceErrorCode" : 100,
    "message" : "Field Value validation failed in REQUEST_BODY: Data Processing Exception while processing fields [/author]",
    "status" : 403
}

Upvotes: 3

Views: 6049

Answers (2)

Selman
Selman

Reputation: 330

From original Microsoft doc : Common Creation Errors

  • Code: 403
  • Message: Not enough permissions to access: POST {endpoint}
  • Description: Indicates the token used has not been scoped to the correct permissions. Generate a new token with w_organization_social or w_member_social.

Upvotes: 0

Zayid Mohammed
Zayid Mohammed

Reputation: 2325

While getting access token, make sure that you pass r_liteprofile and w_member_social permissions in scope.

Then you have to send a GET request to https://api.linkedin.com/v2/me, to get the Lite Profile and you will get the ID from the response.

Use the ID you got from Lite Profile to generate Person URN, eg: "urn:li:person:<ID>"

Upvotes: 4

Related Questions