Skip to main content
All platforms

LinkedIn Marketing & Share APIs

LinkedIn API Errors

LinkedIn API errors developers hit when publishing posts to personal profiles or organization pages.

LinkedIn's API surface uses standard OAuth error names and a small set of permission-scope errors. The trickiest part is the 60-day token expiry — refresh tokens are not granted by default.

Authentication

3 errors in this category

unauthorizedHTTP 401Authentication

LinkedIn token rejected.

Why it happens
LinkedIn access tokens last 60 days. If you never refresh, they hard-expire.
How to fix
Reconnect, or use refresh tokens if your app is approved for them.
How PostPeer handles it
PostPeer applies for LinkedIn's refresh-token product on supported apps and rotates tokens silently.
invalid tokenHTTP 401Authentication

Token is malformed or signed by a stale secret.

Why it happens
OAuth app secret rotated, or the token was hand-edited somewhere.
How to fix
Reconnect.
expired tokenHTTP 401Authentication

Token hit its 60-day expiry.

Why it happens
No refresh happened in the window.
How to fix
Reconnect.

Permissions

2 errors in this category

insufficient permissionsHTTP 403Permissions

Token is missing a scope the call needs.

Why it happens
Common scopes: `w_member_social` (personal posts), `w_organization_social` (page posts), `r_organization_admin` (page admin check).
How to fix
Reconnect with the full set of scopes for the resource you're posting to.
missing permissionHTTP 403Permissions

Operation needs a scope not present on the token.

Why it happens
Same as `insufficient permissions`.
How to fix
Audit the scopes against the LinkedIn Marketing API requirements.

Content

2 errors in this category

spamContent

Post flagged by LinkedIn's spam classifier.

Why it happens
Excessive links, promotional copy, or rapid repeated posting.
How to fix
Rewrite without aggressive promotional phrasing.
blockedContent

Content or account blocked for policy violation.

Why it happens
Hard policy hit on Professional Community Policies.
How to fix
Review LinkedIn policies; contact LinkedIn support if it looks like a false positive.

Media

2 errors in this category

media too largeMedia

File exceeds LinkedIn upload caps.

Why it happens
Images > 10MB or videos > 5GB are rejected; recommended max for video is 200MB for reliability.
How to fix
Compress to fit the limits.
media unsupportedMedia

Media format is not in LinkedIn's accepted list.

Why it happens
Accepted: PNG, JPG, GIF for images; MP4 (H.264) for video.
How to fix
Convert to one of the supported formats.

Quick reference

All 9 LinkedIn errors in one table — Ctrl/Cmd-F to find yours.

CodeWhat it means
unauthorizedLinkedIn token rejected.
invalid tokenToken is malformed or signed by a stale secret.
expired tokenToken hit its 60-day expiry.
insufficient permissionsToken is missing a scope the call needs.
missing permissionOperation needs a scope not present on the token.
spamPost flagged by LinkedIn's spam classifier.
blockedContent or account blocked for policy violation.
media too largeFile exceeds LinkedIn upload caps.
media unsupportedMedia format is not in LinkedIn's accepted list.

Other platforms

Ready to Add Social Media to Your Product?

One API. Every platform. Start building with free credits.

Start Posting for FreeNo credit card required.
POST https://api.postpeer.dev/v1/posts
{ "platforms": ["twitter", "linkedin", "instagram], "content": "Hello world!" }
Published
5 platforms
TwitterLinkedInFacebook+2
All posts delivered
Scheduled
queue
12
Queued
847
Sent
Next: in 15 min
Platforms
connected
XIGFBLITT
One API, every platform