skip to Main Content

LinkedIN has recently released support for webhooks and we are successful in creating a webhook url. We are able to authorise a user administrator of a company to our app and get permissions to write and read from the REST API.

However we are not receiving any webhook updates from the app for that company. And there is no documentation on how to subscribe to a particular company like in other social-media API:s witch we have vast experience from (fb,IG,Twitter).

The documentation on LinkedIn is very limited on the subject. And we are not sure what we can expect from the webhook requests from linkedIn. What is the reason we are not getting Webhooks for that company?

We dont even get webhook calls for the organisation owning the app.

Any help appreciated.

https://learn.microsoft.com/en-us/linkedin/shared/api-guide/webhook-validation?context=linkedin/context

2

Answers


  1. Webhooks are a closed beta feature at this time:

    Who can use this: Any developer using a webhooks API (currently available only for social action notifications on company posts to beta partners)

    Source: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/recent-changes

    Login or Signup to reply.
  2. I figure it out I need to add header json to output for validation.
    Here is my code in php

    if (isset($_REQUEST['challengeCode'])) {
        header('Content-Type: application/json');
        echo json_encode([
            'challengeCode' => $_REQUEST['challengeCode'],
            'challengeResponse' => hash_hmac('sha256', $_REQUEST['challengeCode'], 'client secret'),
        ]);
        exit;
    }
    

    and for webhook subscription

    $api->setApiHeaders([
        'X-Restli-Protocol-Version' => '2.0.0',
    ]);
    $developerUrn = urlencode("urn:li:developerApplication:developerid");
    $personUrn = urlencode("urn:li:person:personid");
    $orgUrn = urlencode(""urn:li:organization:pageid");
    $endpoint = "(developerApplication:$developerUrn,user:$personUrn,entity:$orgUrn,eventType:ORGANIZATION_SOCIAL_ACTION_NOTIFICATIONS)";
    
    $api->api("eventSubscriptions/$endpoint", ['webhook' => "WEBHOOK_URL"], 'PUT');
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search