LinkedIn API
APILinkedIn's APIs for sign-in, member posts and company page management
- Price
- Free
- Access
- OAuth 2.0 access token
About
LinkedIn's REST APIs let any developer add Sign In with LinkedIn and post on a member's behalf. Company page posts, comments and analytics need the vetted Community Management API, open only to registered legal entities. Reading members' own posts is a closed permission.
What you can do with it
- Share text, link and image posts on a member's LinkedIn profile
- Publish and moderate posts and comments on a company page
- Pull follower, page and post statistics for an organization
Get started
- Create an app and add Share on LinkedIn and Sign In with LinkedIn
- Get a member token with the w_member_social scope via OAuth
- Read the member's id (sub) from /v2/userinfo
Example
curl -X POST 'https://api.linkedin.com/rest/posts' \
-H "Authorization: Bearer $LINKEDIN_ACCESS_TOKEN" \
-H 'X-Restli-Protocol-Version: 2.0.0' \
-H 'Linkedin-Version: 202609' \
-H 'Content-Type: application/json' \
-d '{"author": "urn:li:person:'"$LINKEDIN_PERSON_ID"'", "commentary": "Hello LinkedIn",
"visibility": "PUBLIC", "lifecycleState": "PUBLISHED", "isReshareDisabledByAuthor": false,
"distribution": {"feedDistribution": "MAIN_FEED", "targetEntities": [],
"thirdPartyDistributionChannels": []}}'Details
- Hosting
- Hosted service
- Available in
- Worldwide
- Official SDKs
- JavaScript/TypeScript, Python
- MCP server
- None
- Works with