I'm trying to get post analytics (impressions, likes, comments, repost) counts via LinkedIn API
I have following permissions with my 3 legged token
email,openid,profile,r_basicprofile,r_organization_admin,r_organization_social,rw_organization_admin,w_organization_social
Now I've tried fetching impression details through /socialMetadata
curl -X GET 'https://api.linkedin.com/rest/socialMetadata?id=urn%3Ali%3Ashare%3A${postId}' \
-H 'Authorization: Bearer $TOKEN' \
-H 'LinkedIn-Version: 202506' \
-H 'X-Restli-Protocol-Version: 2.0.0'
Response:
{
"status": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "No virtual resource found"
}
Another thing I tried with /organizationalEntityShareStatistics as well
curl -X GET 'https://api.linkedin.com/rest/organizationalEntityShareStatistics?organizationalEntity=urn%3Ali%3Aorganization%3A${orgId}&ugcPosts=urn%3Ali%3AugcPost%3A${postId}' \
-H 'Authorization: Bearer $TOKEN' \
-H 'LinkedIn-Version: 202506' \
-H 'X-Restli-Protocol-Version: 2.0.0'
Response:
{
"status": 404,
"code": "RESOURCE_NOT_FOUND",
"message": "No virtual resource found"
}
I've also tried changing ugc to shares and changing urn to share as well, But still same 404 error.
Only the, /socialMetadata and /socialActions are working.But, its just giving me likes and comments count and not the impressions count.
Is there anything I'm doing wrong
r_organization_socialseems to be superseded byr_organization_social_feedin 2023: learn.microsoft.com/en-us/linkedin/marketing/…