Skip to main content

Overview

OneCLI connects AI agents to LinkedIn through OAuth. Agents can read your profile, email, and create, modify, and delete posts, comments, and reactions. The gateway injects OAuth credentials into requests to the LinkedIn API automatically.

Setup

1

Go to Connections

Open the OneCLI dashboard and navigate to Connections > LinkedIn.
2

Authorize

Click Connect LinkedIn. You’ll be redirected to LinkedIn to authorize OneCLI. Review the requested permissions and click Allow.
OneCLI connect window for LinkedIn on Cloud, showing the Connect to LinkedIn button.

The LinkedIn connect window on OneCLI Cloud.

3

Verify

After authorization, you’ll be redirected back to the dashboard. The connection will show as Connected with your LinkedIn email.

What agents can do

Use cases

  • Content agents that draft and publish LinkedIn posts
  • Engagement agents that respond to comments
  • Social media scheduling agents that post on a schedule
  • Agents that cross-post content from other platforms to LinkedIn

Self-hosted: use your own LinkedIn app

Skip this section on OneCLI Cloud. It’s only for self-hosted OneCLI without LINKEDIN_CLIENT_ID and LINKEDIN_CLIENT_SECRET set, or if you want your own company name on LinkedIn’s consent screen.

1. Create the LinkedIn app

Go to the LinkedIn Developer Portal and select Create app. Name it, link your company’s LinkedIn Page, upload a logo, and create it.
Open Products and request Sign In with LinkedIn using OpenID Connect and Share on LinkedIn. Together they grant the scopes OneCLI requests: openid, profile, email, and w_member_social.
LinkedIn developer app named OneCLI on the Products tab, with Share on LinkedIn under Added products.

The Products tab of your LinkedIn app after adding Share on LinkedIn.

In OneCLI, open Connections > LinkedIn > Custom credentials and copy the Redirect URI. In LinkedIn, open Auth, add it under Authorized redirect URLs for your app, and save.
OneCLI Custom credentials card for LinkedIn with the setup guide link, the Redirect URI and its copy button, and the client ID and secret fields.

Copy the Redirect URI from Custom credentials in OneCLI.

On the Auth tab, copy the Client ID and Primary Client Secret. Paste both into Connections > LinkedIn > Custom credentials, select Save & Connect, and allow access in LinkedIn.

Controlling access

Access is per agent: grant the connection to each agent that needs it, choosing per tool what runs freely, what needs human approval, and what stays blocked — a read-only agent is a single grant. Organization rules add guardrails on top, like rate limits and blanket blocks. Everything is checked before credential injection, so a blocked request never reaches LinkedIn.