DEV Community

Frederik Van Lierde
Frederik Van Lierde

Posted on • Updated on

How to get the AuthorID (and Type) to use with the API and poost on LinkedIn Pages

The following code explains how to post on your LinkedIn Business Page (Company pages and Showcase Pages) and how you can find the author id for your page

Many people are confused with the AuthorID in the API
When you create your access code, you do this with your personal account. But posting on LinkedIn pages doesn't use the personal ID. The API needs the Page ID and Page Type

The following code lets you find how you can find it the correct ID.

Prerequisites

Online Tool

I have created an online tool to make it easier:
Online Tool

The Code

use CodeHelper.API.LinkedIn;

LinkedInHelper _helper = new() { AccessToken = "AQWJ0..." };
List<Organisation> _orgs = await 
                _helper.GetUserOrganizationAccessControl();
foreach(var _org in _orgs)
{
   Console.WriteLine(_org.OrganizationalID + " " + 
                              _org.Localized.LocalizedName);
}
Enter fullscreen mode Exit fullscreen mode

The Author ID's

OrganizationalID return the urn:li:TYPE:ID

Top comments (0)