Skip to content

LinkedIn API errors

LinkedIn API errors when publishing to a personal profile or organization page usually fall into four groups: authentication, permissions, content, and media. This guide maps each documented error code to its likely cause and first fix step, so you can identify the category before changing code, scopes, copy, or media.

LinkedIn API errors: how to identify the category

LinkedIn API errors are easiest to triage by category first, then by exact code. Authentication failures use HTTP 401 in the source. Permissions failures use HTTP 403. Content and media failures are described without an HTTP status in the source, so check the returned code and the request you sent rather than assuming a status. The worked diagnostic example below shows how to classify a failure and choose a first step without changing unrelated parts of the integration.

Authentication errors (401): unauthorized, invalid token, expired token

Authentication errors mean LinkedIn rejected the token itself, before any permission or content check can succeed. The source lists three codes in this category. unauthorized means the LinkedIn token was rejected. invalid token means the token is malformed or signed by a stale secret, for example after an OAuth app secret rotation or if the token was hand-edited. expired token means the token hit its source-stated 60-day expiry because no refresh happened in the window. The fix for all three is to reconnect, using refresh tokens only if your app is approved for them. Before reconnecting, confirm you are not reusing a copied or edited token string, and check the token age against the source-stated 60-day window. Treat the 60-day value as source-stated and verify it against current LinkedIn documentation before encoding it as a guaranteed policy.

Permissions errors (403): insufficient permissions and missing permission

Permissions errors mean the token is valid but does not carry the scope the call needs. insufficient permissions is described as a token missing a scope the call needs, and missing permission is described as an operation needing a scope not present on the token. The source lists w_member_social for personal posts, w_organization_social for page posts, and r_organization_admin for a page admin check. The fix is to reconnect with the full set of scopes for the resource you are posting to, and to audit the scopes against the LinkedIn Marketing API requirements for that resource. A common failure check is posting to an organization page with only the personal-posting scope, or the reverse. The scope decision table below separates the two targets so you can check the right identifier first.

Content errors: spam and blocked

Content errors are about the post or account, not the token. spam means the post was flagged by LinkedIn's spam classifier, which the source attributes to excessive links, promotional copy, or rapid repeated posting. The fix is to rewrite without aggressive promotional phrasing and reduce link density. blocked means the content or account was blocked for a policy violation, described as a hard policy hit on Professional Community Policies. The fix is to review LinkedIn policies and contact LinkedIn support if the block looks like a false positive. When you see spam or blocked, do not retry the identical copy unchanged; change the content or resolve the account issue first, then test with a single post.

Media errors: media too large and media unsupported

Media errors happen when the file itself cannot be accepted. media too large means the file exceeds LinkedIn upload caps. This guide specifies images above 10MB and videos above 5GB are rejected, and recommends a maximum of 200MB for video reliability. media unsupported means the format is not in LinkedIn's accepted list. The source lists PNG, JPG, and GIF for images and MP4 (H.264) for video. The fix is to compress to fit the limits or convert to a supported format. Treat these caps and formats as source-stated values requiring verification against current LinkedIn documentation, and check both file size and format before retrying, because a file can fail on either condition.

Quick reference, failure matrix, and worked diagnostic example

Use the quick reference table to look up any of the 9 documented errors by code. The failure matrix below adds the first diagnostic step for each status and category. In the worked diagnostic example, an expired token on a personal profile should be handled by reconnecting and checking w_member_social, while insufficient permissions on an organization page should be handled by reconnecting with w_organization_social and, where an admin check is involved, r_organization_admin. Keeping those two cases separate prevents the common mistake of treating every 401 or 403 as the same problem.

Separate integration limits from native API specifications

Treat the 10MB image and 5GB video checks described here as the integration’s documented validation thresholds, rather than a universal limit for every LinkedIn upload surface. Native Images and Videos APIs have their own specifications and permissions, which vary by API and media context. LinkedIn’s OAuth documentation describes a 60-day access-token lifetime; use the issued expires_in value to calculate an actual token’s expiration.

Quick reference: all 9 LinkedIn API errors
CodeCategoryWhat it meansLikely causeFirst fix step
unauthorizedAuthenticationLinkedIn token rejected.Token rejected by LinkedIn.Reconnect and check token age.
invalid tokenAuthenticationToken is malformed or signed by a stale secret.OAuth app secret rotated, or token hand-edited.Reconnect with a fresh token.
expired tokenAuthenticationToken hit its 60-day expiry.No refresh happened in the window (source-stated 60 days).Reconnect.
insufficient permissionsPermissionsToken is missing a scope the call needs.Wrong or incomplete scope set for the target.Reconnect with the full scope set for the resource.
missing permissionPermissionsOperation needs a scope not present on the token.Same as insufficient permissions.Audit scopes against LinkedIn Marketing API requirements.
spamContentPost flagged by LinkedIn's spam classifier.Excessive links, promotional copy, or rapid repeated posting.Rewrite without aggressive promotional phrasing.
blockedContentContent or account blocked for policy violation.Hard policy hit on Professional Community Policies.Review LinkedIn policies; contact LinkedIn support if it looks like a false positive.
media too largeMediaFile exceeds LinkedIn upload caps.Images > 10MB or videos > 5GB rejected (source-stated).Compress to fit the limits.
media unsupportedMediaMedia format is not in LinkedIn's accepted list.Format outside PNG, JPG, GIF, or MP4 (H.264) (source-stated).Convert to a supported format.

Codes, categories, and meanings preserved from source; causes and first steps are original diagnostic guidance.

Scope decision table: personal vs organization posting
TargetScope to checkUse
Personal profilew_member_socialPersonal posts.
Organization pagew_organization_socialPage posts.
Organization page admin checkr_organization_adminPage admin check.

Scope identifiers preserved exactly from source; approval requirements require verification against current LinkedIn documentation.

Failure matrix: status and category to first fix step
HTTP status / categoryError codesLikely causeFirst fix step
401 / Authenticationunauthorized, invalid token, expired tokenToken rejected, malformed, stale-secret, or expired.Reconnect; do not reuse a hand-edited token.
403 / Permissionsinsufficient permissions, missing permissionToken missing the scope the call needs.Reconnect with w_member_social or w_organization_social for the target.
Content (no status stated)spam, blockedSpam classifier flag or policy block.Rewrite copy, or review Professional Community Policies.
Media (no status stated)media too large, media unsupportedFile exceeds source-stated caps or uses an unsupported format.Compress or convert to PNG, JPG, GIF, or MP4 (H.264).

HTTP 401 and 403 preserved from source; content and media have no HTTP status stated in source.

Media limits and formats (source-stated)
Media typeSource-stated capSource-stated accepted formats
ImageImages > 10MB rejectedPNG, JPG, GIF
VideoVideos > 5GB rejected; 200MB recommended maximum for reliabilityMP4 (H.264)

Source-stated values requiring verification against current LinkedIn documentation before presenting as current fact.

Frequently asked questions

How do I tell whether a LinkedIn API error is authentication, permissions, content, or media?

Start with the category. HTTP 401 points to authentication, such as unauthorized, invalid token, or expired token. HTTP 403 points to permissions, such as insufficient permissions or missing permission. Content errors such as spam and blocked, and media errors such as media too large and media unsupported, require checking the post copy, account status, file size, and file format.

Which scope should I check for personal versus organization posting?

For a personal profile, the scope is w_member_social. For an organization page, it is w_organization_social. The source also lists r_organization_admin for a page admin check. Reconnect with the full scope set for the resource you are posting to, then retry.

What media limits and formats does the source list for LinkedIn?

This guide specifies images above 10MB and videos above 5GB are rejected, with 200MB recommended as a maximum for video reliability. Accepted formats are listed as PNG, JPG, and GIF for images and MP4 (H.264) for video. Treat these as source-stated values to verify against current LinkedIn documentation before relying on them as current policy.

What is the fix for an expired token?

Reconnect is the fix for unauthorized, invalid token, and expired token. The source describes a 60-day token expiry. Verify that value against current LinkedIn documentation before encoding it as a guaranteed policy, and use refresh tokens only if your app is approved for them.