Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

linkedin-api

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
}
like image 362
Tikam Chand Avatar asked Sep 22 '26 18:09

Tikam Chand


1 Answers

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>"

like image 200
Zayid Mohammed Avatar answered Sep 28 '26 23:09

Zayid Mohammed