Reactions

Warning

Deprecation Notice
The Marketing version 202304 (Marketing April 2023) and below has been sunset and the unversioned APIs are going to be sunset soon. We recommend that you migrate to the versioned APIs as well as migrate to the new Content and Community Management APIs to avoid disruptions. See the Migration page for more details. If you haven’t yet migrated and have questions, submit a request on the LinkedIn Developer Support Portal.

The Reactions API replaces the likes functionality provided by the existing socialActions endpoint. The new service provides access to "reactions" which are an expansion of likes.

The service currently provides the following methods:

  • Get a Reaction
  • Batch Get a Collection of Reactions
  • Get Reactions on Shares
  • Create a Reaction on a Share
  • Create a Reaction on a Comment
  • Delete a Reaction

For fetching social actions on a share, please visit Social Metadata API. For creating and retrieving a comment, please visit Comments API.

Permissions

Permission Description
w_organization_social Post, comment and react on posts on behalf of an organization. Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
  • RECRUITING_POSTER
r_organization_social Retrieve organizations' posts, comments, and reactions. Restricted to organizations in which the authenticated member has one of the following company page roles.
  • ADMINISTRATOR
  • DIRECT_SPONSORED_CONTENT_POSTER
w_member_social Posts, comments and reaction posts on behalf of an authenticated member.
r_member_social Restricted Retrieve posts, reactions, and likes on behalf of an authenticated member. This permission is granted to select developers only.

Access to Social Actions APIs

Deprecation/Note: Today, all the Social Actions APIs identified are part of the permissions shown in the above table. We plan to deprecate these APIs from these permissions in June 2023.

Every Community Management developer must perform the following:

  1. Request Development tier access to the new API through developer.linkedin.com and then upgrade to the Standard Tier.
  2. Update the existing OAuth access token permissions scope to include the new permissions above. This will warrant a new consent text to be shown to your member, and a re-auth process.
APIs Old Permission Name New Permission Name Deprecation Date
/reactions /socialActions/comments /socialActions/likes /socialMetadata r_organization_social r_organization_social_feed June 2023
/reactions /socialActions/comments /socialActions/likes /socialMetadata w_organization_social w_organization_social_feed June 2023
/reactions /socialActions/comments /socialActions/likes /socialMetadata w_member_social w_member_social_feed June 2023

See Organization Access Control for more information on company page roles.

Note

You may never store profile information, other than person URNs retrieved from the shares API.

Reactions

Schema

Field Format Description Required
reactionType Enum String The type of reaction. Possible values are:
  • LIKE: "Like" in the UI
  • PRAISE: "Celebrate" in the UI
  • MAYBE: DEPRECATED. Used to be "Curious" in the UI
  • EMPATHY: "Love" in the UI
  • INTEREST: "Insightful" in the UI
  • APPRECIATION: "Support" in the UI
  • ENTERTAINMENT: "Funny" in the UI
  • Yes
    root Urn Thread of this social action. For comments on a share, the root of both nested and top level comments would be the share urn. Yes
    created AuditStamp An AuditStamp corresponding to the creation of this resource. Not settable
    lastModified AuditStamp An AuditStamp corresponding to the last modification of this resource. Not settable
    deleted AuditStamp An AuditStamp corresponding to the deletion of this resource. Not settable

    Note

    The MAYBE reactionType (curious in the UI) is deprecated starting from version 202307. Using MAYBE reactionType on CREATE and UPDATE would return 400.

    Get a Reaction

    GET https://api.linkedin.com/rest/reactions/(actor:{encoded personUrn|encoded organizationUrn},entity:{encoded shareUrn|encoded ugcPostUrn|encoded commentUrn})
    
    GET https://api.linkedin.com/v2/reactions/(actor:{personUrn|organizationUrn},entity:{shareUrn|ugcPostUrn|commentUrn})
    

    Sample Response

    {
        "id": "urn:li:reaction:(urn:li:person:rboDhL7Xsf,urn:li:activity:7067167295080394752)",
        "lastModified": {
            "actor": "urn:li:person:rboDhL7Xsf",
            "time": 1686183251857
        },
        "reactionType": "LIKE",
        "created": {
            "actor": "urn:li:person:rboDhL7Xsf",
            "time": 1686183251857
        },
        "root": "urn:li:activity:7067167295080394752"
    }
    

    Batch Get a Collection of Reactions

    GET https://api.linkedin.com/rest/reactions?ids=List((actor:{encoded personUrn|encoded organizationUrn},entity:{encoded shareUrn|encoded ugcPostUrn|encoded commentUrn}),(actor:{encoded personUrn|encoded organizationUrn},entity:{encoded shareUrn|encoded ugcPostUrn|encoded commentUrn}))
    
    GET https://api.linkedin.com/v2/reactions?ids=List((actor:{personUrn|organizationUrn},entity:{shareUrn|ugcPostUrn|commentUrn}))
    

    Sample Response

    {
        "statuses": {
            "(actor:urn%3Ali%3Aperson%3ArboDhL7Xsf,entity:urn%3Ali%3Aactivity%3A7067167295080394752)": 200
        },
        "results": {
            "(actor:urn%3Ali%3Aperson%3ArboDhL7Xsf,entity:urn%3Ali%3Aactivity%3A7067167295080394752)": {
                "id": "urn:li:reaction:(urn:li:person:rboDhL7Xsf,urn:li:activity:7067167295080394752)",
                "lastModified": {
                    "actor": "urn:li:person:rboDhL7Xsf",
                    "time": 1686183251857
                },
                "reactionType": "LIKE",
                "created": {
                    "actor": "urn:li:person:rboDhL7Xsf",
                    "time": 1686183251857
                },
                "root": "urn:li:activity:7067167295080394752"
            }
        },
        "errors": {}
    }
    

    Get Reactions on a Share

    Schema

    Field Name Type Description
    sort String (value:CHRONOLOGICAL)- Sort by created date ascending.
    (value:REVERSE_CHRONOLOGICAL) - Sort by created date descending.
    (value:RELEVANCE) - Sort by relevance to the viewer. By default, it is set to (value:REVERSE_CHRONOLOGICAL).
    Field Name Type Description
    sort String CHRONOLOGICAL- Sort by created date ascending.
    REVERSE_CHRONOLOGICAL - Sort by created date descending.
    RELEVANCE - Sort by relevance to the viewer. By default, it is set to REVERSE_CHRONOLOGICAL.
    GET https://api.linkedin.com/rest/reactions/(entity:{entityUrn})?q=entity&sort=(value:REVERSE_CHRONOLOGICAL)
    
    GET https://api.linkedin.com/rest/reactions/(entity:{encoded entityUrn})?q=entity&sort={sortOrder}
    
    
    GET https://api.linkedin.com/v2/reactions/(entity:{entityUrn})?q=entity&sort={sortOrder}
    

    Sample Response

    {
        "elements": [
            {
                "id": "urn:li:reaction:(urn:li:person:rboDhL7Xsf,urn:li:activity:7067167295080394752)",
                "lastModified": {
                    "actor": "urn:li:person:rboDhL7Xsf",
                    "time": 1686257332832
                },
                "reactionType": "LIKE",
                "created": {
                    "actor": "urn:li:person:rboDhL7Xsf",
                    "time": 1686257332832
                },
                "root": "urn:li:activity:7067167295080394752"
            }
        ],
        "paging": {
            "count": 10,
            "start": 0,
            "total": 1,
            "links": []
        }
    }
    

    Create a Reaction on a Share

    Sample Request

    POST https://api.linkedin.com/rest/reactions?actor={encoded organizationUrn|encoded personUrn}
    
    {
        "root": "{unencoded activityURN for a share|unencoded shareURN|unencoded ugcPostURN}",
        "reactionType": "{REACTION_TYPE}"
    }
    
    POST https://api.linkedin.com/v2/reactions?actor={organizationUrn|personUrn}
    
    {
        "root": "urn:li:activity:6666",
        "reactionType": "{REACTION_TYPE}"
    }
    

    Sample Response

    {
        "id": "urn:li:reaction:(urn:li:person:A8xe03Qt10,urn:li:activity:6666)",
        "reactionType": "LIKE",
        "created": {
            "actor": "urn:li:person:A8xe03Qt10",
            "time": 1555543895726
        },
        "root": "urn:li:activity:6666",
        "lastModified": {
            "actor": "urn:li:person:A8xe03Qt10",
            "time": 1555543895726
        }
    }
    

    A successful response returns a 201 Created.

    Create a Reaction on a Comment

    Sample Request

    POST https://api.linkedin.com/rest/reactions?actor={encoded organizationUrn|encoded personUrn}
    
    {
        "root": "urn:li:comment:(urn:li:activity:6666,120381273128)",
        "reactionType": "{REACTION_TYPE}"
    }
    
    POST https://api.linkedin.com/v2/reactions?actor={organizationUrn|personUrn}
    
    {
        "root": "urn:li:comment:(urn:li:activity:6666,120381273128)",
        "reactionType": "{REACTION_TYPE}"
    }
    

    Sample Response

    {
        "id": "urn:li:reaction:(urn:li:person:A8xe03Qt10,urn:li:comment:(urn:li:activity:6666,120381273128)",
        "reactionType": "LIKE",
        "created": {
            "actor": "urn:li:person:A8xe03Qt10",
            "time": 1555543895730
        },
        "root": "urn:li:comment:(urn:li:activity:6666,120381273128)",
        "lastModified": {
            "actor": "urn:li:person:A8xe03Qt10",
            "time": 1555543895730
        }
    }
    

    A successful response returns a 201 Created.

    Delete a Reaction

    DELETE https://api.linkedin.com/rest/reactions/(actor:{encoded personUrn|encoded organizationUrn},entity:{encoded shareUrn|encoded ugcPostUrn|encoded commentUrn})
    
    DELETE https://api.linkedin.com/v2/reactions/(actor:{personUrn|organizationUrn},entity:{shareUrn|ugcPostUrn|commentUrn})
    

    A successful response returns a 204 No Content status code.