# LinkedIn on boxd

> LinkedIn is a professional networking platform enabling job seekers, companies, and thought leaders to connect, share content, and discover business opportunities.

- Page: https://boxd.sh/integrations/linkedin/
- CLI: `run linkedin` (22 commands, 5 marked common)
- SDK: `import { linkedin } from "@boxd/run"`; every parameter and response type is at `@boxd/run/linkedin`
- Triggers: none
- Connect: `run auth linkedin` (Sign in with LinkedIn), or https://app.boxd.sh/integrations/detail/linkedin
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth linkedin      # once: prints a link to connect your account
run linkedin           # list its commands
run linkedin get-person --help
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, linkedin } from "@boxd/run";

every("1 hour", async () => {
  const result = await linkedin.getPerson({ person_id: "…" });
  console.log(result);
});
```

Run it with `run linkedin.run.ts`. LinkedIn has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run linkedin <command> --help` lists the optional ones. "common" marks what `run linkedin` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `create-article-or-url-share` ·common | `linkedin.createArticleOrUrlShare()` | `--author` `--specificContent` `--visibility` | 1 | Create an article or URL share on LinkedIn using the UGC Posts API |
| `create-comment-on-post` | `linkedin.createCommentOnPost()` | `--actor` `--message` `--object` `--target-urn` | 2 | Create a first-level or nested comment on a LinkedIn share, UGC post, or parent comment via the Social Actions Comments API |
| `create-linked-in-post` | `linkedin.createLinkedInPost()` | `--author` `--commentary` | 9 | Creates a new post on LinkedIn for the authenticated user or an organization they manage |
| `delete-linked-in-post` | `linkedin.deleteLinkedInPost()` | `--share-id` | 0 | Deletes a specific LinkedIn post (share) by its unique `share_id`, which must correspond to an existing share |
| `delete-post` | `linkedin.deletePost()` | `--post-urn` | 0 | Delete a LinkedIn post using the Posts API REST endpoint |
| `delete-ugc-post` | `linkedin.deleteUgcPost()` | `--ugc-post-urn` | 0 | Delete a UGC post using the legacy UGC Post API endpoint |
| `get-ad-targeting-facets` | `linkedin.getAdTargetingFacets()` | — | 0 | Retrieve available ad targeting facets from LinkedIn Marketing API |
| `get-audience-counts` | `linkedin.getAudienceCounts()` | `--targetingCriteria` | 1 | Retrieves audience size counts for specified targeting criteria |
| `get-company-info` | `linkedin.getCompanyInfo()` | — | 4 | Retrieves organizations where the authenticated user has specific roles (ACLs), to determine their management or content posting capabilities for LinkedIn company pages |
| `get-image` | `linkedin.getImage()` | `--image-urn` | 0 | Retrieve details of a LinkedIn image using its URN |
| `get-images` | `linkedin.getImages()` | `--ids` | 0 | Retrieve image metadata including download URLs, status, and dimensions from LinkedIn's Images API |
| `get-my-info` | `linkedin.getMyInfo()` | — | 0 | Fetches the authenticated LinkedIn user's profile information including name, headline, profile picture, and other profile details |
| `get-network-size` | `linkedin.getNetworkSize()` | `--organization-id` | 1 | Retrieve the follower count for a LinkedIn organization |
| `get-org-page-stats` | `linkedin.getOrgPageStats()` | `--organization` | 3 | Retrieve page statistics for a LinkedIn organization page |
| `get-person` ·common | `linkedin.getPerson()` | `--person-id` | 0 | Retrieves a LinkedIn member's profile information by their person ID |
| `get-post-content` ·common | `linkedin.getPostContent()` | `--post-id` | 0 | Retrieve detailed post content including text, images, videos, and metadata from LinkedIn by post URN |
| `get-share-stats` | `linkedin.getShareStats()` | `--organizational-entity` | 1 | Retrieves share statistics for a LinkedIn organization, including impressions, clicks, likes, comments, and shares |
| `get-videos` | `linkedin.getVideos()` | — | 2 | Retrieves video metadata from LinkedIn for a video owned by a person or organization |
| `initialize-image-upload` ·common | `linkedin.initializeImageUpload()` | `--owner` | 0 | Initialize an image upload to LinkedIn and return a presigned upload URL plus the resulting image URN |
| `list-reactions` | `linkedin.listReactions()` | `--entity` | 3 | Retrieves reactions (likes, celebrations, etc.) on a LinkedIn entity such as a share, post, or comment |
| `register-image-upload` ·common | `linkedin.registerImageUpload()` | `--owner-urn` | 2 | Initialize a native LinkedIn image upload for feed shares and return a presigned upload URL plus the resulting digital media asset URN |
| `search-ad-targeting-entities` | `linkedin.searchAdTargetingEntities()` | `--facet` `--query` | 3 | Search for ad targeting entities using typeahead search |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
