PostPost

LinkedIn Reactions

Add reactions (like, insightful, love, etc.) to LinkedIn posts programmatically using the PostPost API.

Overview

LinkedIn supports 6 different reaction types. PostPost allows you to add or remove any of these reactions on posts visible to your connected account.

Available Reaction Types

ReactionDescriptionIcon
LIKEStandard likeThumbs up
PRAISEApplause / celebrationClapping hands
EMPATHYLove / supportHeart
INTERESTInsightful / thought-provokingLightbulb
APPRECIATIONSupportiveHands together
ENTERTAINMENTFunnyLaughing face

Prerequisites

  • PostPost API key
  • LinkedIn account connected via PostPost dashboard
  • The postedId (LinkedIn URN) of the post

Add a Reaction

Endpoint: POST https://api.postpost.dev/api/v1/linkedin-reactions

Parameters

ParameterTypeRequiredDescription
postedIdstringYesLinkedIn post URN
reactionTypestringYesOne of: LIKE, PRAISE, EMPATHY, INTEREST, APPRECIATION, ENTERTAINMENT
platformIdstringYesYour LinkedIn platform ID

JavaScript Example - Add "Insightful" Reaction

const response = await fetch('https://api.postpost.dev/api/v1/linkedin-reactions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    postedId: 'urn:li:ugcPost:7429953213384187904',
    reactionType: 'INTEREST',  // Insightful (lightbulb)
    platformId: 'linkedin-ABC123'
  })
});

const data = await response.json();
console.log(data);
// {
//   success: true,
//   reaction: {
//     id: "urn:li:reaction:(urn:li:person:xxx,urn:li:ugcPost:xxx)",
//     reactionType: "INTEREST"
//   },
//   urnTranslated: { from: "urn:li:activity:xxx", to: "urn:li:ugcPost:xxx" }  // Only present if URN was translated
// }

Note: The urnTranslated field is only present when the provided postedId was automatically translated to a different URN format (e.g., from urn:li:activity:xxx to urn:li:ugcPost:xxx). This helps debug URN format issues.

Python Example - Add "Like" Reaction

import requests

response = requests.post(
    'https://api.postpost.dev/api/v1/linkedin-reactions',
    headers={
        'Content-Type': 'application/json',
        'x-api-key': 'YOUR_API_KEY'
    },
    json={
        'postedId': 'urn:li:ugcPost:7429953213384187904',
        'reactionType': 'LIKE',
        'platformId': 'linkedin-ABC123'
    }
)

print(response.json())

cURL Example - Add "Love" Reaction

curl -X POST https://api.postpost.dev/api/v1/linkedin-reactions \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "postedId": "urn:li:ugcPost:7429953213384187904",
    "reactionType": "EMPATHY",
    "platformId": "linkedin-ABC123"
  }'

Remove a Reaction

Endpoint: DELETE https://api.postpost.dev/api/v1/linkedin-reactions

Parameters

ParameterTypeRequiredDescription
postedIdstringYesLinkedIn post URN
platformIdstringYesYour LinkedIn platform ID

JavaScript Example

const response = await fetch('https://api.postpost.dev/api/v1/linkedin-reactions', {
  method: 'DELETE',
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    postedId: 'urn:li:ugcPost:7429953213384187904',
    platformId: 'linkedin-ABC123'
  })
});

const data = await response.json();
// { success: true }

cURL Example

curl -X DELETE https://api.postpost.dev/api/v1/linkedin-reactions \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "postedId": "urn:li:ugcPost:7429953213384187904",
    "platformId": "linkedin-ABC123"
  }'

Common Use Cases

Auto-engage with industry content

// React to multiple posts with "Insightful"
const postIds = [
  'urn:li:ugcPost:123456789',
  'urn:li:ugcPost:987654321',
  'urn:li:ugcPost:456789123'
];

for (const postedId of postIds) {
  await fetch('https://api.postpost.dev/api/v1/linkedin-reactions', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      postedId,
      reactionType: 'INTEREST',
      platformId: 'linkedin-ABC123'
    })
  });

  // Add delay to avoid rate limits
  await new Promise(r => setTimeout(r, 1000));
}

Important Notes

  • Network visibility: You can only react to posts visible in your LinkedIn network
  • One reaction per post: LinkedIn allows only one reaction type per post per user
  • URN format matters: Use urn:li:share:xxx or urn:li:ugcPost:xxx, NOT urn:li:activity:xxx from LinkedIn URLs
  • Change reaction: To change your reaction, delete the existing one first, then add the new one

Getting the Correct URN

LinkedIn URLs use urn:li:activity:xxx but the API requires urn:li:share:xxx or urn:li:ugcPost:xxx.

For posts created via PostPost:

const response = await fetch('https://api.postpost.dev/api/v1/get-post/YOUR_POST_GROUP_ID', {
  headers: { 'x-api-key': 'YOUR_API_KEY' }
});
const postedId = (await response.json()).posts[0].postedId;

On this page