Retrieve Linkedin posts of type document with Linkedin API
Using Linkedin posts API (https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/posts-api?view=li-lms-2022-12) and the version 202212
, I was previously able to retrieve posts documents (until april 2023)
Now, I don't receive the same data structure than before when I call this endpoint :
https://api.linkedin.com/rest/posts?q=author&author=urn%3Ali%3Aorganization%3A9999999&start=0&count=100&projection=(paging,elements*(id,author,content(*,media(*,id)),adContext,commentary,visibility,createdAt,lastModifiedAt,publishedAt))
Response received now, for instance :
{
"paging": {
"total": 16,
"start": 0,
"count": 100,
"links": []
},
"elements": [
{
"lastModifiedAt": 1683638910738,
"visibility": "PUBLIC",
"publishedAt": 1683638910738,
"author": "urn:li:organization:9999999",
"content": {
"media": {
"id": "urn:li:document:D4E1FAQG22Pch2Nv65g",
"title": "test"
}
},
"createdAt": 1683638910738,
"id": "urn:li:ugcPost:706169341734422558848",
"commentary": ""
}
--- more elements
I tried changing the projection
parameter or even remove it when adding the newest version 202304
Before, I received a response with an identifier
and I was able to get data of documents associated to the post.
I also checked the changelog of the API (https://learn.microsoft.com/en-us/linkedin/marketing/integrations/recent-changes?view=li-lms-2023-04) but it didn't helped me to understand how to solve this issue.
Comments
Post a Comment