3

I want to get shares by owners from LinkedIn api. I used the following url:

https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:{accountId}

But I become this error:

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

what is wrong? Can someone help me?

Thank you

Matteo
  • 32,801
  • 10
  • 89
  • 100
vDrews
  • 135
  • 12
  • take care that the id of a person is an alphanumeric value, something similar to `yrZCpj2Z12 ` the the call should be like `https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:yrZCpj2Z12` – Matteo Feb 07 '19 at 09:14
  • I use the Id that i become when i call https://api.linkedin.com/v2/me?projection=(id) isn't this right? – vDrews Feb 07 '19 at 09:30
  • yes, it works for me. Verify your app/token use `r_member_social` for member shares – Matteo Feb 07 '19 at 10:26
  • thank you i will test it an write a comment again. :) – vDrews Feb 08 '19 at 06:27

2 Answers2

3

I have a same issue when try post a new share with a organization as owner:

'owner': 'urn:li:organization:12345678' in this case numeric id is a valid value, what's wrong?

The request body is:

{'owner': 'urn:li:organization:12345678', 'content': {'title': u'test', 'contentEntities': [{'thumbnails': [{'resolvedUrl': u'https://testurl.com/image.jpg'}], 'entityLocation': u'https://test.com'}], 'description': u'test'}, 'text': {'text': u'test'}, 'distribution': {'linkedInDistributionTarget': {}}, 'subject': u'test'}

The response is:

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

Update:

Fixed: permission related issue, sorry!

  • @user1190132 is guess this is linked to https://docs.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#common-retrieval-errors – Sebastien H. Sep 06 '19 at 10:54
2

In this endpoint, make sure you doing request without X-Restli-Protocol-Version in your request headers.

Also urn must be escaped.

May be useful for someone, because I had this issue and banged head until i got help from live support.

alexey_the_cat
  • 1,660
  • 18
  • 28