AI Labs

LinkedIn’s API Shift: What I Learned Creating AI Agents That Post to Business Pages

LinkedIn API illustration representing Business Pages and AI integration

As someone constantly exploring how AI can automate marketing workflows, I recently hit an unexpected wall while building an AI agent to post content to a LinkedIn Business Page—not a personal profile. What I discovered could save you hours if you’re doing the same.

The challenge? LinkedIn’s API has changed, and the rules for posting to a Company Page are very different from posting to your own timeline.

Here’s what you need to know:

  • Unlike personal LinkedIn profiles, Business Pages have their own dedicated API endpoint, and more importantly, they require special permission to gain access. The magic ingredient is something called a URN (Uniform Resource Name). This URN is essential for OAuth 2.0 authentication—it tells LinkedIn who you are and what page you’re trying to manage.

The process goes like this:

  1. Register Your App on LinkedIn Developer Portal
    You’ll need to create a LinkedIn app and request specific permissions like w_member_social and rw_organization_admin.
  2. Request Access to the Marketing API
    This is where things slow down. LinkedIn doesn’t give this out freely—you submit a request, wait for review, and if approved, you get the green light to move forward. For me, this approval took a few days.
  3. Retrieve the Organization URN
    Using either Python or curl commands in your terminal, you make a call to LinkedIn’s /organizationalEntityAcls endpoint to fetch the URN for your company page. It looks something like urn:li:organization:12345678.
  4. Integrate the URN Into Your AI Agent
    Once you’ve got that URN, you can finally plug it into your AI workflow—whether you’re scheduling posts, pushing out blog content, or generating carousels with AI. Your agent uses this value when making authenticated POST requests to publish content.

Once I cleared the API hurdles, everything clicked into place. Setting up the AI agent wasn’t particularly difficult—it just required clear documentation, a bit of terminal work, and patience waiting for LinkedIn’s approval.

If you’re automating content or building AI agents for clients, this is an important distinction to know. Company pages aren’t plug-and-play like personal profiles. But with the right permissions and that golden URN in hand, the possibilities are wide open.

TL;DR:

  • LinkedIn’s Business Pages use a separate API endpoint.
  • You need special permission and a URN to post content via OAuth 2.0.
  • Requires a bit of terminal work (Python or Curl).
  • Approval from LinkedIn can take a few days.
  • Once set up, it integrates cleanly with your AI workflows.
Scroll to Top