restlinkedin-apiarticle

Post an article to company LinkedIN page via REST api (v2)


Using v2 of LinkedIn REST API I'm searching for a way to post an article to my company's LinkedIn page.

I've signed up here https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner/marketing-developer-program and currently waiting to be approved.

I want to be able to create a blog post on my company website and when i press 'publish' i want to post that blog post, as an article, to my companys LinkedIn page.

The closest i've been to finding information regarding this topic is https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/articles-api But this does not disclose any information for posting articles, only retrieving and deleting them


Solution

  • You can share articles to your LinkedIn company feed using content entities (contentlocation and thumbnail). You can also provide a title and description for the article you want to share.

    An example of a share with article is as follows:

    {
        "owner": "urn:li:organization:12345",
        "content": {
            "contentEntities": [{
                "entityLocation": "https://www.example.com/content.html",
                "thumbnails": [{
                    "resolvedUrl": "https://www.example.com/image.jpg"
                }]
            }],
            "description": "content description",
            "title": "Test Company Share with Content"
        },
    
        "text": {
            "text": "This is a share with an article"
        }
    }
    

    Documentation for this API endpoint can be found here:

    https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/shares/share-api#share-content.

    Hope it helps!