> ## Documentation Index
> Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# LinkedIn Integration: Social Engagement for Agents

> Agents can read your profile and create posts on LinkedIn. OAuth credentials are injected automatically.

## 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

<Steps>
  <Step title="Go to Connections">
    Open the OneCLI dashboard and navigate to **Connections** > **LinkedIn**.
  </Step>

  <Step title="Authorize">
    Click **Connect LinkedIn**. You'll be redirected to LinkedIn to authorize OneCLI. Review the requested permissions and click **Allow**.
  </Step>

  <Step title="Verify">
    After authorization, you'll be redirected back to the dashboard. The connection will show as **Connected** with your LinkedIn email.
  </Step>
</Steps>

## What agents can do

| Area                          | Description                                                              |
| ----------------------------- | ------------------------------------------------------------------------ |
| **Profile (read)**            | View your name, photo, headline, and identity                            |
| **Email (read)**              | Access your primary email address                                        |
| **Posts & Reactions (write)** | Create, modify, and delete posts, comments, and reactions on your behalf |

## 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 setup

For self-hosted deployments, configure your own LinkedIn OAuth app:

1. Create an app in the [LinkedIn Developer Portal](https://www.linkedin.com/developers/)
2. Set the environment variables `LINKEDIN_CLIENT_ID` and `LINKEDIN_CLIENT_SECRET`

## Controlling access with rules

Use OneCLI's [rules engine](/guides/rules) to control what agents can do. For example, allow profile reads but block post creation, or require manual approval before publishing. Rules are evaluated before credential injection.
