Publishing to LinkedIn via the Octopost API
LinkedIn supports text posts and image posts to personal profiles. Octopost handles OAuth authentication, token refresh, the UGC Post API formatting, and the multi-step image upload flow automatically -- you just send us your content.
Content Limits
| Type | Limit |
|---|---|
| Post text | 3,000 characters |
| Images per post | 4 |
| Image formats | JPEG, PNG, GIF |
| Video | Not supported via API (requires special LinkedIn approval) |
| Threads | Not supported |
| Polls | Not supported via API |
Good to Know
- 100 posts per day, hard limit. LinkedIn's Share API allows 100 requests per day per user. This is one of the strictest limits across all platforms. Octopost tracks your daily usage and will report when you are approaching or have hit the limit.
- Organization pages require extra permissions. Posting to LinkedIn Company Pages requires the
w_organization_socialscope, which needs additional approval from LinkedIn. Octopost currently supports personal profile posting. If you need organization posting, contact us. - Links get preview cards for free. Including a URL in your post text will generate a link preview card on LinkedIn automatically. No special handling needed -- just include the URL in your content.
- No markdown or rich formatting. LinkedIn's API accepts plain text only. Any formatting in your content will be posted as-is.
Rate Limits
Octopost tracks LinkedIn's 100 requests/day limit per user. If you attempt to publish when the limit has been reached, Octopost will reject the request immediately with a clear message rather than sending it to LinkedIn and getting a raw error back.
Error Reporting
| What happened | What Octopost reports |
|---|---|
| Text exceeds 3,000 characters | Rejected before sending, with the character count |
| Daily rate limit reached | rate_limited -- includes when the limit resets |
| Token expired | Octopost refreshes the token automatically. You will not see this unless the refresh token is also expired (after 365 days), in which case: auth_failed -- user needs to reconnect |
| Missing permissions for organization post | forbidden -- account does not have organization posting scope |
| Invalid content | invalid_content -- with LinkedIn's explanation of what was wrong |
Things Octopost Handles for You
You do not need to worry about any of the following, but in case you are curious:
- OAuth 2.0 authentication. Octopost manages the full OAuth flow including the
w_member_socialandr_basicprofilescopes needed for personal profile posting. - Token refresh. LinkedIn access tokens last 60 days and refresh tokens last 365 days. Octopost monitors expiration and refreshes tokens automatically before they expire.
- UGC Post API formatting. LinkedIn requires posts in a specific UGC format with
urn:li:person:{id}author URNs, lifecycle state, and nested content structures. Octopost builds all of this from your plain content. - Image upload via registerUpload. LinkedIn does not accept image URLs directly. Images must go through a three-step process: register the upload to get a destination URL and asset URN, upload the binary image data to that URL, then reference the asset URN in the post. Octopost handles this entire cycle for each image.
- API versioning headers. LinkedIn requires specific version headers on API requests. Octopost includes the correct versioned headers automatically.
Example
{
"content": "Excited to share our latest product update! https://example.com/blog/update",
"platforms": ["linkedin"],
"media": {
"images": [
{ "url": "https://example.com/screenshot.png" }
]
}
}That's it. Octopost takes care of the rest.