# LinkedIn (/docs/platforms/linkedin)



FeedHorizon posts to **personal LinkedIn profiles**. Company pages are planned and not available yet.

Connecting an account [#connecting-an-account]

LinkedIn connects with LinkedIn sign-in (OAuth). Open **Connections** in the dashboard, or send a connect link (`POST /api/v1/platform-invites` with `"platform": "linkedin"`, see [Connect links](/docs/guides/connect-links)).

FeedHorizon asks LinkedIn for `openid`, `profile`, `email` and `w_member_social` (post on the member's behalf). A LinkedIn connection lasts 60 days. Where LinkedIn issues a refresh token, FeedHorizon renews it automatically. Where it does not, you get the `account.expiring` webhook 7 days before the end, and the account turns `needs_reauth` once it has expired.

What you can post [#what-you-can-post]

|                | Limit                                                                                             |
| -------------- | ------------------------------------------------------------------------------------------------- |
| Text           | 3,000 characters                                                                                  |
| Files per post | 1 file, or none                                                                                   |
| Images         | JPEG, PNG or GIF                                                                                  |
| Videos         | MP4                                                                                               |
| Documents      | PDF                                                                                               |
| File size      | Up to 100 MB by URL import or 5 GB by upload. The platform may refuse large files when publishing |

PDFs are shown as a swipeable document post.

Text-only posts work too. WebP images and MOV or WebM videos are not accepted for LinkedIn; convert them first.

Example [#example]

```bash title="cURL"
curl -X POST https://feedhorizon.com/api/v1/posts \
  -H "Authorization: Bearer fh_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "profileId": "prof_…",
    "content": "We just shipped scheduled exports.\n\nEvery report can now land in your inbox on a fixed day.",
    "platforms": ["linkedin"],
    "mediaIds": ["med_…"],
    "scheduledFor": "2026-11-10T09:00:00+01:00"
  }'
```

After publishing [#after-publishing]

The LinkedIn target of the post carries the post URN in `platformPostId` (for example `urn:li:share:7654321098765432`) and the link in `platformUrl`.

Errors [#errors]

Checked before the post is stored (`400`, see [Error handling](/docs/api/errors)):

| Code                     | Cause                                   | Fix                                                          |
| ------------------------ | --------------------------------------- | ------------------------------------------------------------ |
| `content_too_long`       | More than 3,000 characters              | Shorten the text, or give LinkedIn its own text in `targets` |
| `too_many_media`         | More than one file                      | Keep one image, video or PDF                                 |
| `media_type_unsupported` | For example a WebP image or a MOV video | Convert to JPEG/PNG/GIF or MP4                               |

While publishing (in `targets[].error`, see [Publishing errors](/docs/api/errors#publishing-errors)). Rate limits and outages are retried automatically:

| Code                   | Cause                                                                                                          | Fix                                                                                      |
| ---------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `account_needs_reauth` | The connection expired or was revoked                                                                          | Reconnect the account, then [retry the post](/docs/guides/scheduling#retry-failed-posts) |
| `platform_auth_failed` | LinkedIn refused the token or a permission is missing                                                          | Reconnect the account, then retry                                                        |
| `platform_rejected`    | LinkedIn rejected the post, for example as a duplicate of a recent post. `error.message` has LinkedIn's reason | Change the content, then retry                                                           |
