Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.social-api.ai/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The LinkedIn connector lets you publish posts as the authenticated individual member (your personal LinkedIn profile). It authenticates through LinkedIn’s OAuth 2.0 flow with OpenID Connect and uses the “Share on LinkedIn” REST API.
LinkedIn connects as the individual member, posting to that person’s feed. Posting to LinkedIn organization (company) pages is not available yet.

Capabilities

CapabilitySupported
Publish posts (text, image, video, multi-image)Yes
Update post textYes
Delete postsYes
Read postsNo
CommentsNo
Direct messagesNo
ReviewsNo
MentionsNo
Posts only. Reading existing posts from the platform, comments, DMs, reviews, and mentions are not available for member accounts.
Comment management (read, reply, like, delete) and reading posts are coming soon for LinkedIn organization (company) pages, pending LinkedIn’s Community Management API approval. Direct messages, reviews, and mentions are not offered by LinkedIn’s API and will remain unavailable.

Authentication

LinkedIn uses OAuth 2.0. Connect an account through the standard connect flow:
  1. Call the connect endpoint with platform=linkedin.
  2. Redirect the user to the returned auth_url.
  3. LinkedIn redirects back to your redirect_uri with a code.
  4. The code is exchanged for an access token automatically.

Scopes

The connector requests these scopes:
  • openid, profile — identify the member (used to read the person’s name, picture, and ID)
  • w_member_social — publish posts as the member

Token lifetime

LinkedIn member access tokens last about 60 days and cannot be refreshed programmatically. When a token expires, the member reconnects the account to continue publishing.

Required header

All API calls send LinkedIn-Version (currently 202605) and use the Rest.li protocol.

Connecting an account

curl -X POST https://api.social-api.ai/v1/accounts/connect \
  -H "Authorization: Bearer $SOCIALAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"platform": "linkedin", "redirect_uri": "https://yourapp.com/callback"}'
After connecting, the response contains a single connected account: the authenticated member. That account is what you publish to.

Publishing a post

curl -X POST https://api.social-api.ai/v1/posts \
  -H "Authorization: Bearer $SOCIALAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "targets": [{ "account_id": "acc_01HZ9X3Q4R5M6N7P8V2K0W1J" }],
    "text": "Hello from SocialAPI!",
    "media_ids": ["f47ac10b-58cc-4372-a567-0e02b2c3d479"]
  }'
Posts publish to the member’s feed. You can attach a single image, a single video, or multiple images (a carousel). Mixed image and video carousels are not supported.

Quirks and limitations

  • LinkedIn connects as the individual member, not an organization page. Organization page posting is not available yet.
  • Reading a member’s own posts from the platform requires elevated permissions and is not available, so listing posts returns the posts SocialAPI has stored, not a live read from LinkedIn.
  • Comments, direct messages, reviews, and mentions are not available for member accounts.
  • LinkedIn does not scrape link previews; provide your own thumbnail, title, and description for article posts.
  • The post URN is returned in a response header, not the body.
  • Member access tokens last about 60 days with no programmatic refresh; the member reconnects when the token expires.
  • LinkedIn does not provide a token revocation API; disconnecting removes the stored token on our side only.

Next steps

Publishing posts

Full reference for the LinkedIn post payload.

Publishing overview

How publishing works across platforms.