OpenClaw can send messages on Telegram, Discord, Slack — but LinkedIn posting wasn't supported. I patched the extension to add image uploads and published it as a ClawHub skill.
This guide covers setup from scratch: LinkedIn app, verification, OAuth token, skill install, and your first post.
Prerequisites
- OpenClaw running (any install method)
- A LinkedIn account
- 10 minutes
Step 1: Create a LinkedIn App
- Go to linkedin.com/developers/apps
- Click Create app
- Fill in:
- App name:
OpenClaw Poster(or anything) - LinkedIn Page: select your page (create one if needed)
- Logo: any image
- App name:
- Click Create app
Step 2: Verify Your App
LinkedIn requires your app to be linked to a Company Page:
- Under the Settings tab, find App verification
- Click Verify — this sends a request to the Page admin
- If it's your own page, approve it from your Page admin notifications
Without verification, API calls will fail with 403.
Step 3: Add Required Products
Under the Products tab, request these two:
-
Share on LinkedIn — grants
w_member_social(needed for posting) -
Sign In with LinkedIn using OpenID Connect — grants
openid,profile(needed to get your person URN)
Both are approved instantly for verified apps.
Step 4: Get Your Access Token
Under the Auth tab:
- Copy your Client ID and Client Secret
- Generate a token using LinkedIn's OAuth Token Generator or the 3-legged OAuth flow
- Make sure the token includes scopes:
w_member_social,openid,profile
Save the access token — you'll need it in Step 7.
Step 5: Get Your Person URN
Your person URN is your LinkedIn user ID. Get it with:
curl -s -H "Authorization: Bearer YOUR_TOKEN" \
"https://api.linkedin.com/v2/userinfo" | jq '.sub'
The result looks like: urn:li:person:Abc123
Step 6: Install the Skill
npm install -g clawhub
clawhub install linkedin-poster
Or browse it at: clawhub.ai/david3xu/linkedin-poster
Step 7: Configure OpenClaw
Add your LinkedIn credentials to ~/.openclaw/openclaw.json under channels:
{
"channels": {
"linkedin": {
"accessToken": "YOUR_ACCESS_TOKEN",
"personUrn": "urn:li:person:YOUR_ID",
"enabled": true
}
}
}
Restart the gateway to pick up the new config.
Step 8: Post from Your Agent
Text post:
message send --channel linkedin --text "Hello from OpenClaw"
Image post:
message send --channel linkedin --text "Check this out" --media /path/to/image.png
The skill handles LinkedIn's 3-step image upload automatically: register → upload binary → create post.
Troubleshooting
| Error | Fix |
|---|---|
| 401 Unauthorized | Token expired — regenerate in LinkedIn Developer portal |
| 403 Forbidden | Missing w_member_social scope — check app permissions |
| Image upload 400 | File too large (>10MB) — compress first |
What's Different About This Skill
The existing LinkedIn skill on ClawHub uses browser session cookies — ClawHub's security scanner flagged it as risky. This skill uses LinkedIn's official UGC API. No cookies, no scraping, no paid third-party service.
Built by David Xu
Top comments (0)