Skip to main content

LinkedIn

Using hosted SimplePost? See connection requirements. The credential setup below is for your own SDK, local CLI, or self-hosted integration.

LinkedIn posting uses an OAuth access token and a member or organization identity.

Content support

Current hosted app and core source

CapabilitySimplePost support
Text / caption (characters)3,000 text
Media9 items max; 9 images max; 1 video max; No mixed images/video
Video size200 MiB maximum
  • LinkedIn allows larger multipart video uploads, but this publisher currently uses the single-request Assets API upload.
  • LinkedIn documents an image pixel-count limit, but not a maximum image byte size.

These validation limits also match published SDK 1.3.1.

Provider permissions and quotas still apply. SimplePost storage can impose a lower upload limit. MB/GB use decimal bytes; MiB/GiB use binary bytes.

Set up credentials

  1. Create a LinkedIn app in the LinkedIn Developer portal.
  2. Request the products and permissions needed for posting (w_member_social, plus openid, profile, email if you need login data).
  3. Configure OAuth redirect URIs for your app or Scheduler deployment.
  4. Run the OAuth authorization flow.
  5. Store the access token and member ID or page/organization ID.
  6. Confirm the token has posting permissions before using it in automation.

The CLI does not bundle a LinkedIn OAuth app. To use it from the CLI, supply your own client secret through SIMPLE_POST_LINKEDIN_CLIENT_SECRET before running simplepost account add linkedin.

Environment variables

LINKEDIN_ACCESS_TOKEN=
LINKEDIN_MEMBER_ID=

Both variables must be set together.

SDK options

await post({
content: {
text: "Posting to LinkedIn",
media: [{ type: "image", path: "./photo.jpg" }],
},
platforms: ["linkedin"],
options: {
linkedin: {
visibility: "PUBLIC",
},
},
});

visibility can be:

  • PUBLIC
  • CONNECTIONS

REST server account

Add this entry under accounts in the self-hosted REST server's accounts.json:

{
"id": "linkedin-page",
"platform": "linkedin",
"credentials": {
"accessToken": "...",
"memberId": "..."
},
"options": {
"visibility": "PUBLIC"
}
}