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:
- 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. - 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. - 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. - 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.