0
votes

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
}
1
Contact Linkedin developer's support - alexey_the_cat
I'm trying to debug a similar issue, so I'm confused as well! However, I do notice that you're requesting a permission for working with an organization (w_organization_social), but your body seems to reference a "Person ID" (urn:li:person:<id>). Are you trying to post to a user's profile (w_member_social permission) or an organization page (w_organization_social permission)? - rinogo
For any others this may help, our particular problem was that it turns out that we forgot to update our auth code to request the w_organization_social permission. That's our bad. But LinkedIn, you've really got to step up your game. Really - how hard would it be to return an error message like, "This action requires the w_organization_social permission scope."? - rinogo

1 Answers

1
votes

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