Skill detail
Broad LinkedIn automation CLI with clear operational and safety coverage.
Inspect before use
Automated review checks relevance, not safety or endorsement. Read the source instructions before using this skill.
SKILL.md
The saved excerpt is a snapshot from review. The external source remains the complete and most current version.
---
name: linkedin
description: LinkedIn automation via the Linked API CLI - fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and run Sales Navigator and custom workflows. Use when the user wants to interact with LinkedIn.
user-invocable: false
disable-model-invocation: true
version: 1.0.0
category: ai-service
author: Linked API (vprudnikoff)
license: MIT
progressive_disclosure:
entry_point:
summary: "Linked API CLI: fetch/search LinkedIn people and companies, send messages, manage connections, create posts, react, comment, plus Sales Navigator and custom workflows."
when_to_use: "LinkedIn automation - profile and company lookups, people/company search, messaging, connection management, posting, or Sales Navigator workflows through the linkedin CLI."
quick_start: "1. Install @linkedapi/linkedin-cli 2. Export LINKEDAPI_TOKEN and LINKEDAPI_IDENTIFICATION_TOKEN 3. Run linkedin setup 4. Call commands with --json -q and check the success field."
context_limit: 4200
tags:
- linkedin
- social-media
- automation
- api
- cli
- messaging
- sales-navigator
- agent-workflows
requires_tools: []
---
# LinkedIn - Linked API Automation CLI
## Overview
`linkedin` is a CLI tool for LinkedIn automation built on Linked API. Use it to fetch profiles, search people and companies, send messages, manage connections, create posts, react, comment, and run Sales Navigator and custom workflows.
Each command sends a request to Linked API, which runs a real cloud browser to perform the action on LinkedIn. Operations are **not instant** - expect 30 seconds to several minutes depending on complexity.
Install the CLI when `linkedin` is not available:
```bash
npm install -g @linkedapi/linkedin-cli
```
## Safety & Compliance
Read this before running any command.
- **LinkedIn User Agreement risk.** Automated connection requests, messaging, scraping, and posting can violate LinkedIn's User Agreement and can lead to account restriction or suspension. The account owner is responsible for compliance with LinkedIn's terms and applicable law. Confirm the user accepts this risk before performing write actions at scale.
- **Confirm write and outreach actions.** Require explicit user approval before sending messages, connection requests, InMail, posts, reactions, or comments. Show the exact target and content first.
- **Credentials only.** Use the Linked API token and identification token issued from the dashboard. Never request LinkedIn passwords, 2FA codes, cookies, session exports, recovery codes, or browser profile data.
- **Respect action limits.** Per-account limits are configurable on the platform. A `limitExceeded` error means the limit was reached - stop and report it rather than retrying.
## Authentication
The CLI reads credentials from environment variables. Export them so secrets stay out of shell history and process listings. Never pass tokens as CLI arguments.
When a command fails with exit code 2 (authentication error), guide the user through setup:
1. Go to [app.linkedapi.io](https://app.linkedapi.io) and sign up or log in.
2. Connect the LinkedIn account.
3. Copy the **Linked API Token** and **Identification Token** from the dashboard.
Export the tokens and run setup:
```bash
export LINKEDAPI_TOKEN="your-linked-api-token"
export LINKEDAPI_IDENTIFICATION_TOKEN="your-identification-token"
linkedin setup
```
Treat an exposed token as compromised and rotate it in the Linked API dashboard. Do not put tokens in source files, committed examples, issue text, chat transcripts, screenshots, or logs.
## Global Flags
Always use `--json` and `-q` for machine-readable output:
```bash
linkedin <command> --json -q
```
Optionally set `LINKEDAPI_CLIENT=skill:linkedin` in the environment once so Linked API can attribute usage to this skill. There is no need to repeat it on every command.
| Flag | Description |
|------|-------------|
| `--json` | Structured JSON oRead the full source on GitHub (opens external page)