7

I am trying to use linkedin API for showing the feeds of my profile what i have posted from the day first. posts include media, images, video etc. I would like to know is there any Api available for that where i can pass some parameter and get all posts of my linkedin Profile. Please help if anyone have done this before

Thanks!!

Wahab Ahmed
  • 159
  • 1
  • 1
  • 11

2 Answers2

9

You can Retrieve Shares with the api using the person id:

curl  -X GET \
   -H "Authorization:Bearer token<>" \
 'https://api.linkedin.com/v2/shares?q=owners&owners=urn:li:person:{id}'

You can retrieve the person id with the Retrieve Authenticated Member's Profile API

 curl  -X GET \
   -H "Authorization:Bearer <token>" \
 'https://api.linkedin.com/v2/me?projection=(id)'

Hope this help

Matteo
  • 37,680
  • 11
  • 100
  • 115
  • Thanks for your help – Wahab Ahmed Feb 19 '19 at 10:40
  • 3
    @Matteo I can retrieve my profile ID using `https://api.linkedin.com/v2/me?projection=(id)` . But trying to retrieve posts returns `403 - Not enough permissions to access: GET-owners /shares`. – Amir Asyraf Nov 17 '19 at 23:34
  • 1
    See the permission section https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#permissions probably you need to ask for extended permission for you app – Matteo Nov 18 '19 at 09:29
  • to access pull type of information ( pull likes, posts, comments ) of a user , you need " r_member_social " permission , which you can only get after applying to Linkedin marketing developer program. Post applying for his, you may or may not be approved by Linkedin for this permission. – Sudhansu Singh Jan 18 '23 at 14:12
  • 2
    Hi from 2023. They are shutting down this API today. Do you know what alternative are we supposed to use? – fombo Feb 28 '23 at 08:55
  • @fombo, I've got response that hints about the API is healthy but requires request header preset with token `{"serviceErrorCode":65604,"message":"Empty oauth2 access token","status":401}` – Nikolai Varankine Jun 18 '23 at 16:22
  • Any site for end-users which allows us to do the same? – siliconpi Aug 15 '23 at 12:00
-2

You can use the official linkedin api documentation to get all your posts id , then using that you can retrieve more information. Refer https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/ugc-post-api?tabs=http