To access LinkedIn programmatically in OpenClaw, run `clawhub install linkedin-api` in your terminal, set your LINKEDIN_ACCESS_TOKEN in OpenClaw config, and make LinkedIn REST API calls from OpenClaw chat. The skill provides low-level access to LinkedIn's API for posting, reading profiles, retrieving analytics, and managing connections — giving you full programmatic control over LinkedIn operations without a browser.
Programmatic LinkedIn Access via REST API from OpenClaw
The LinkedIn API skill gives OpenClaw direct programmatic access to LinkedIn's REST API, enabling operations that go beyond casual social interaction. With this skill configured, you can post on behalf of your LinkedIn account, retrieve detailed engagement analytics for your posts, read profile and company page data, manage UGC (User Generated Content) posts, and access follower demographics — all through OpenClaw chat or automated workflows triggered by other skills.
This skill is particularly valuable for content creators managing a LinkedIn presence at scale, marketing teams that need LinkedIn data in automation pipelines, founders who want to build LinkedIn publishing workflows into their OpenClaw setup, and developers building applications that interact with LinkedIn. The low-level API access means you can perform any operation LinkedIn's API supports, not just the operations a higher-level social interaction tool exposes.
The LinkedIn API skill differs from the LinkedIn social skill in its interaction model. The LinkedIn social skill provides natural-language browsing — you can ask it to 'browse my feed' or 'find posts about AI funding rounds' using a higher-level abstraction. The LinkedIn API skill gives you direct REST API access with an access token — more powerful and precise, but requiring you to understand what API operations you want to perform. If you need programmatic posting, analytics, or data retrieval, use this API skill. If you want to browse and engage with LinkedIn conversationally, use the LinkedIn social skill.
Integration method
LinkedIn API is available as a native ClawHub skill, installed with a single `clawhub install` command and running entirely inside OpenClaw. The skill authenticates using a LinkedIn access token you provide and exposes LinkedIn's REST API capabilities through OpenClaw chat prompts. You configure the LINKEDIN_ACCESS_TOKEN environment variable and then make API operations through natural language instructions in OpenClaw chat.
Prerequisites
- OpenClaw installed and running (see openclaw.ai for installation instructions)
- ClawHub CLI available in your terminal (comes bundled with OpenClaw)
- A LinkedIn account with developer access — either a personal account or access to a LinkedIn Developer Application
- A LinkedIn access token with the required OAuth 2.0 scopes for your intended operations (r_liteprofile, w_member_social, r_organization_social, etc.)
- Terminal/command line access to run the clawhub install command
Step-by-step guide
Install the LinkedIn API Skill via ClawHub
Install the LinkedIn API Skill via ClawHub
Open your terminal and run the clawhub install command to add the linkedin-api skill to your OpenClaw instance. ClawHub downloads the skill package from the registry and registers it with your local OpenClaw configuration. The skill requires a LinkedIn access token, which you will configure in the next step. After installation, run `clawhub info linkedin-api` to see the required configuration keys and supported API operations. The key required variable is `LINKEDIN_ACCESS_TOKEN`. Some advanced operations may require additional scopes on your access token or additional configuration. The skill will not activate until the LINKEDIN_ACCESS_TOKEN is configured. Attempting to use it before configuration returns a clear error message pointing you to the missing token.
1clawhub install linkedin-apiPro tip: After installation, check `clawhub info linkedin-api` for the complete list of supported LinkedIn API operations and the OAuth scopes required for each one. This helps you request the right permissions when generating your access token.
Expected result: Terminal shows 'linkedin-api@X.X.X installed successfully' with a note about required configuration keys. The skill appears in `clawhub list`.
Obtain a LinkedIn Access Token
Obtain a LinkedIn Access Token
LinkedIn uses OAuth 2.0 for API authentication. You need an access token with the appropriate scopes for the operations you plan to perform. There are two ways to get a LinkedIn access token: using LinkedIn's Developer Portal to create an app and generate a token, or using an existing token from a LinkedIn app you have already created. To create a LinkedIn Developer App and get an access token: 1. Go to developer.linkedin.com and sign in with your LinkedIn account. 2. Click 'Create App', fill in the required details (App Name, LinkedIn Page, App Logo, Legal Agreement). 3. Once the app is created, go to the 'Auth' tab and note the Client ID and Client Secret. 4. Under 'OAuth 2.0 scopes', request the scopes you need: `w_member_social` for posting, `r_liteprofile` for profile reading, `r_organization_social` for company page operations. 5. Use the OAuth 2.0 Authorization Code flow or LinkedIn's token generator tool to exchange your authorization code for an access token. LinkedIn access tokens expire after 60 days by default. Refresh tokens can extend this, but most personal use cases simply require generating a new token periodically. Keep your access token private — it provides posting and reading access to your LinkedIn account. Never commit it to version control or share it in chat logs.
1# After obtaining your token, configure it in OpenClaw2clawhub config set LINKEDIN_ACCESS_TOKEN AQX...your-token-here34# Verify the token is stored5clawhub config get LINKEDIN_ACCESS_TOKEN67# Reload OpenClaw configuration8clawhub reloadPro tip: LinkedIn access tokens expire after 60 days. Set a calendar reminder to regenerate your token before it expires to avoid unexpected authentication failures in your workflows. Some LinkedIn app configurations support refresh tokens that extend the validity period — check your app settings in developer.linkedin.com.
Expected result: Running `clawhub config get LINKEDIN_ACCESS_TOKEN` returns your token masked. OpenClaw confirms the linkedin-api skill is active and authenticated.
Test the Skill with a Profile or API Query
Test the Skill with a Profile or API Query
Before testing any write operations (posting), verify the skill is working correctly by making a read-only API call — fetching your own profile data. This confirms the token is valid and has the expected permissions without risking unintended published content. In OpenClaw chat, ask the skill to fetch your LinkedIn profile information. If the API call succeeds, you will see your LinkedIn profile data returned as structured information. If the call fails with a 401 error, the token is invalid or expired. If it fails with a 403 error, the token lacks the required scope for that operation. Once you have confirmed read access works correctly, you can test write operations — start with a draft post or a post on a test LinkedIn account before publishing to your actual profile.
Use the LinkedIn API to fetch my profile information — show me my name, current title, and the number of connections I have.
Paste this in OpenClaw chat
Pro tip: Always test new LinkedIn API operations on a personal test account or with a draft post first, especially write operations. LinkedIn's API is relatively strict about rate limits and automated posting policies — verifying behavior on a test account avoids having your main account flagged.
Expected result: OpenClaw returns your LinkedIn profile data including name, headline, and basic profile information, confirming the access token is valid and the skill is correctly configured.
Post to LinkedIn and Retrieve Analytics
Post to LinkedIn and Retrieve Analytics
With the skill configured and tested, you can now use the full range of LinkedIn API operations from OpenClaw chat. For content publishing, the skill supports text posts, article shares, image posts, and video posts depending on the LinkedIn API version and your app's permissions. For analytics retrieval, the skill can fetch impressions, engagement metrics, and audience data for your posts and company pages. This data is useful for understanding content performance and can be exported to spreadsheets or databases via other OpenClaw skills for ongoing tracking. RapidDev offers configuration support for teams building LinkedIn content automation pipelines — particularly useful when combining the LinkedIn API skill with AI content generation skills (like ai-ppt-generator or summarize) to create end-to-end content workflows that generate and publish without manual steps. Note that LinkedIn's API has posting rate limits and content policies — automated or high-volume posting may trigger LinkedIn's spam detection. Keep posting frequency within reasonable bounds (2-3 posts per day maximum for individual accounts) and ensure all content is genuine and adds value.
Post this update to my LinkedIn via the API: 'Three lessons from shipping our first AI product: 1. Start with the simplest possible version. 2. Talk to users before writing code. 3. Distribution matters as much as the product. What lessons would you add?' Add hashtags #productmanagement #startup #lessons
Paste this in OpenClaw chat
1# Example: Retrieve analytics for recent posts via clawhub CLI2clawhub run linkedin-api --action get-post-analytics --limit 1034# Example: Post a text update5clawhub run linkedin-api --action create-post --text 'Your post text here' --visibility publicPro tip: For recurring LinkedIn posting workflows, save your most effective post templates as OpenClaw prompt templates. You can then trigger a new post by referencing the template and providing the specific content — this is faster than writing full posting instructions from scratch each time.
Expected result: The post appears on your LinkedIn profile as published content. Analytics retrieval returns structured engagement data for the requested posts.
Common use cases
Automated LinkedIn Post Publishing
Use the LinkedIn API skill to publish text posts, article shares, or multi-media updates to your LinkedIn profile or company page programmatically. This enables content publishing workflows where OpenClaw generates content (using AI generation skills) and then publishes it directly to LinkedIn without manual copy-paste.
Post the following update to my LinkedIn profile via the API: 'Excited to share that we just closed our seed round. 3 years of building in stealth, and now it's time to tell the story. More details in the comments.' Include the hashtags #startup #founder #fundraising.
Copy this prompt to try it in OpenClaw
Post Engagement Analytics Retrieval
Retrieve engagement metrics for your LinkedIn posts — impressions, likes, comments, shares, and click-through rates — to understand which content resonates with your audience. Pull this data into OpenClaw for analysis or export to a Google Sheets or Notion database for tracking over time.
Retrieve the engagement analytics for my last 10 LinkedIn posts via the API. Show me the impressions, likes, and comments for each post. Which post performed best by engagement rate?
Copy this prompt to try it in OpenClaw
LinkedIn Profile and Company Page Data Retrieval
Fetch structured data about LinkedIn profiles, company pages, or followers for research, competitive analysis, or CRM enrichment. The API provides access to public profile information, follower counts, and content published by specific pages.
Use the LinkedIn API to fetch the public profile information and follower count for the company page of 'Anthropic'. Return the data as structured JSON.
Copy this prompt to try it in OpenClaw
Troubleshooting
LinkedIn API skill returns '401 Unauthorized' when making API calls
Cause: The LINKEDIN_ACCESS_TOKEN is missing from OpenClaw config, set under the wrong variable name, or the token has expired (LinkedIn tokens expire after 60 days).
Solution: Run `clawhub config get LINKEDIN_ACCESS_TOKEN` to verify the token is stored. If it returns empty, re-run the config set command. If the token was working previously but stopped, it may have expired — generate a new token from developer.linkedin.com and update the config.
1# Check token configuration2clawhub config get LINKEDIN_ACCESS_TOKEN34# Reset with a new token5clawhub config set LINKEDIN_ACCESS_TOKEN AQX-your-new-token6clawhub reloadclawhub install linkedin-api fails with '429 Too Many Requests' or timeout
Cause: The ClawHub skill registry is experiencing temporary rate limiting. This is a registry-side issue.
Solution: Wait 2-3 minutes and retry. Use `clawhub install linkedin-api --force` to clear partial installation state if needed.
1clawhub install linkedin-api --forceLinkedIn API returns '403 Forbidden' when posting or reading certain data
Cause: The access token does not have the OAuth 2.0 scope required for that specific operation. For example, `w_member_social` is required for posting but not automatically included in all tokens.
Solution: Review the required scopes for the operation you are attempting in the LinkedIn Developer documentation. Re-generate your access token with the correct additional scopes enabled in your LinkedIn app settings.
1# Check required scopes:2# w_member_social - for posting updates3# r_liteprofile - for reading your profile4# r_organization_social - for company page operations5# Regenerate token at developer.linkedin.com with required scopesLinkedIn API rate limit exceeded — too many requests error
Cause: LinkedIn's API has rate limits per token — typically 100 requests per day for standard apps or higher limits for approved Marketing API partners. Automated workflows can hit this quickly.
Solution: Reduce the frequency of API calls. Add delays between operations in automated workflows. For higher limits, apply for LinkedIn's Marketing Developer Platform access which grants elevated rate limits for approved use cases.
Best practices
- Store your LINKEDIN_ACCESS_TOKEN in the OpenClaw .env file or skill config only — never include it in chat prompts, scripts committed to version control, or shared configuration files.
- Set a calendar reminder 55 days after generating a LinkedIn access token — tokens expire after 60 days and you want to refresh before workflows start failing unexpectedly.
- Test all API operations on a personal test account before using them on your main professional LinkedIn profile — API posting errors can result in partial or duplicate posts that need manual cleanup.
- Keep LinkedIn API posting frequency reasonable — LinkedIn's spam detection can flag accounts that post too frequently via API, especially if the content pattern looks automated. 1-2 API posts per day is a safe upper limit for individual accounts.
- Request only the OAuth scopes you actually need when generating your access token — the principle of least privilege reduces the risk if your token is ever compromised.
- Combine the LinkedIn API skill with AI content generation skills for end-to-end content workflows, but always review AI-generated LinkedIn content before posting — automated publishing of AI content without human review risks reputational issues.
- For analytics workflows, export LinkedIn engagement data to Google Sheets or Notion regularly rather than relying on API calls each time you need historical data — this builds a persistent record and reduces API usage.
- If you manage multiple LinkedIn accounts or company pages, generate separate access tokens for each and use distinct OpenClaw profiles or config environments to keep them separate.
Alternatives
LinkedIn skill provides natural language social interaction with LinkedIn — browse feeds, engage with posts, and manage presence conversationally without needing to understand API operations.
X/Twitter skill provides direct platform interaction with X/Twitter — better when your social media focus is on X rather than LinkedIn.
Postiz handles scheduled cross-platform social media posting including LinkedIn — better when you want a scheduling queue for multiple platforms rather than direct LinkedIn API access.
Upload Post handles immediate publishing to social platforms — simpler than direct API access when you just need to publish a one-off post rather than build an API integration.
Frequently asked questions
How do I install the LinkedIn API skill in OpenClaw?
Run `clawhub install linkedin-api` in your terminal. Then obtain a LinkedIn access token from developer.linkedin.com and configure it with `clawhub config set LINKEDIN_ACCESS_TOKEN your-token`. Run `clawhub reload` and the skill is ready for API calls in OpenClaw chat.
How do I configure the OpenClaw LinkedIn API access token?
Run `clawhub config set LINKEDIN_ACCESS_TOKEN AQX-your-access-token-here` in the terminal. The token can also be added to `~/.openclaw/.env` as `LINKEDIN_ACCESS_TOKEN=AQX-your-token`. Run `clawhub reload` after any configuration change. Verify it is set correctly with `clawhub config get LINKEDIN_ACCESS_TOKEN`.
Where do I get a LinkedIn access token for OpenClaw?
Go to developer.linkedin.com, create a LinkedIn Developer App, configure the OAuth 2.0 scopes you need (at minimum `r_liteprofile` and `w_member_social`), and generate an access token using the Authorization Code flow. The LinkedIn Developer Portal provides a token generator tool for testing. Access tokens expire after 60 days.
ClawHub install linkedin-api is not working — what should I do?
Confirm the exact skill name: `linkedin-api` (with a hyphen). If the install fails with a timeout, wait a few minutes and retry — ClawHub's registry occasionally experiences brief rate limits. Run `clawhub install linkedin-api --force` to clear any partial installation state before retrying.
What is the difference between the LinkedIn API skill and the LinkedIn skill in OpenClaw?
LinkedIn API provides programmatic REST API access via an access token — you control specific operations like posting, analytics retrieval, and profile data fetching. LinkedIn social skill provides higher-level natural language interaction with LinkedIn — you can browse your feed, engage with posts, and manage your presence conversationally. LinkedIn API is for developers and automation; LinkedIn social skill is for conversational social media management.
Does RapidDev offer help building LinkedIn automation workflows in OpenClaw?
Yes — RapidDev can help configure LinkedIn API integration as part of content automation pipelines combining the LinkedIn API skill with AI content generation tools. The individual setup on this page covers self-serve configuration. Teams building systematic LinkedIn publishing or analytics workflows can contact RapidDev for a configuration review.
How often do LinkedIn access tokens expire, and how do I refresh them?
LinkedIn access tokens expire after 60 days by default. To refresh, generate a new token from your app in developer.linkedin.com and update your OpenClaw config with `clawhub config set LINKEDIN_ACCESS_TOKEN your-new-token` followed by `clawhub reload`. Some LinkedIn app configurations support refresh tokens for longer-lived access — check your app's OAuth settings in the LinkedIn Developer Portal.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation