<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: david3xu</title>
    <description>The latest articles on DEV Community by david3xu (@david3xu).</description>
    <link>https://dev.to/david3xu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3833277%2Fc9adb43d-8199-43dd-82df-0f6ae73cbfb9.png</url>
      <title>DEV Community: david3xu</title>
      <link>https://dev.to/david3xu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/david3xu"/>
    <language>en</language>
    <item>
      <title>How to Post to LinkedIn from Your OpenClaw Agent</title>
      <dc:creator>david3xu</dc:creator>
      <pubDate>Thu, 19 Mar 2026 11:41:51 +0000</pubDate>
      <link>https://dev.to/david3xu/how-to-post-to-linkedin-from-your-openclaw-agent-1f55</link>
      <guid>https://dev.to/david3xu/how-to-post-to-linkedin-from-your-openclaw-agent-1f55</guid>
      <description>&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;This guide covers setup from scratch: LinkedIn app, verification, OAuth token, skill install, and your first post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;OpenClaw running (any install method)&lt;/li&gt;
&lt;li&gt;A LinkedIn account&lt;/li&gt;
&lt;li&gt;10 minutes&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Create a LinkedIn App
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Go to &lt;a href="https://www.linkedin.com/developers/apps" rel="noopener noreferrer"&gt;linkedin.com/developers/apps&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create app&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Fill in:

&lt;ul&gt;
&lt;li&gt;App name: &lt;code&gt;OpenClaw Poster&lt;/code&gt; (or anything)&lt;/li&gt;
&lt;li&gt;LinkedIn Page: select your page (create one if needed)&lt;/li&gt;
&lt;li&gt;Logo: any image&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create app&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Verify Your App
&lt;/h2&gt;

&lt;p&gt;LinkedIn requires your app to be linked to a Company Page:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Under the &lt;strong&gt;Settings&lt;/strong&gt; tab, find &lt;strong&gt;App verification&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Verify&lt;/strong&gt; — this sends a request to the Page admin&lt;/li&gt;
&lt;li&gt;If it's your own page, approve it from your Page admin notifications&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Without verification, API calls will fail with 403.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Add Required Products
&lt;/h2&gt;

&lt;p&gt;Under the &lt;strong&gt;Products&lt;/strong&gt; tab, request these two:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Share on LinkedIn&lt;/strong&gt; — grants &lt;code&gt;w_member_social&lt;/code&gt; (needed for posting)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sign In with LinkedIn using OpenID Connect&lt;/strong&gt; — grants &lt;code&gt;openid&lt;/code&gt;, &lt;code&gt;profile&lt;/code&gt; (needed to get your person URN)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Both are approved instantly for verified apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Get Your Access Token
&lt;/h2&gt;

&lt;p&gt;Under the &lt;strong&gt;Auth&lt;/strong&gt; tab:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Copy your &lt;strong&gt;Client ID&lt;/strong&gt; and &lt;strong&gt;Client Secret&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Generate a token using LinkedIn's &lt;a href="https://www.linkedin.com/developers/tools/oauth/token-generator" rel="noopener noreferrer"&gt;OAuth Token Generator&lt;/a&gt; or the 3-legged OAuth flow&lt;/li&gt;
&lt;li&gt;Make sure the token includes scopes: &lt;code&gt;w_member_social&lt;/code&gt;, &lt;code&gt;openid&lt;/code&gt;, &lt;code&gt;profile&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Save the access token — you'll need it in Step 7.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Get Your Person URN
&lt;/h2&gt;

&lt;p&gt;Your person URN is your LinkedIn user ID. Get it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-s&lt;/span&gt; &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer YOUR_TOKEN"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="s2"&gt;"https://api.linkedin.com/v2/userinfo"&lt;/span&gt; | jq &lt;span class="s1"&gt;'.sub'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The result looks like: &lt;code&gt;urn:li:person:Abc123&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Install the Skill
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; clawhub
clawhub &lt;span class="nb"&gt;install &lt;/span&gt;linkedin-poster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or browse it at: &lt;a href="https://clawhub.ai/david3xu/linkedin-poster" rel="noopener noreferrer"&gt;clawhub.ai/david3xu/linkedin-poster&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Configure OpenClaw
&lt;/h2&gt;

&lt;p&gt;Add your LinkedIn credentials to &lt;code&gt;~/.openclaw/openclaw.json&lt;/code&gt; under &lt;code&gt;channels&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"channels"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"linkedin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"accessToken"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"YOUR_ACCESS_TOKEN"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"personUrn"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"urn:li:person:YOUR_ID"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"enabled"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restart the gateway to pick up the new config.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Post from Your Agent
&lt;/h2&gt;

&lt;p&gt;Text post:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;message send &lt;span class="nt"&gt;--channel&lt;/span&gt; linkedin &lt;span class="nt"&gt;--text&lt;/span&gt; &lt;span class="s2"&gt;"Hello from OpenClaw"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Image post:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;message send &lt;span class="nt"&gt;--channel&lt;/span&gt; linkedin &lt;span class="nt"&gt;--text&lt;/span&gt; &lt;span class="s2"&gt;"Check this out"&lt;/span&gt; &lt;span class="nt"&gt;--media&lt;/span&gt; /path/to/image.png
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The skill handles LinkedIn's 3-step image upload automatically: register → upload binary → create post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Troubleshooting
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Error&lt;/th&gt;
&lt;th&gt;Fix&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;401 Unauthorized&lt;/td&gt;
&lt;td&gt;Token expired — regenerate in LinkedIn Developer portal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;403 Forbidden&lt;/td&gt;
&lt;td&gt;Missing &lt;code&gt;w_member_social&lt;/code&gt; scope — check app permissions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Image upload 400&lt;/td&gt;
&lt;td&gt;File too large (&amp;gt;10MB) — compress first&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  What's Different About This Skill
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;




&lt;p&gt;Built by &lt;a href="https://linkedin.com/in/david-xu" rel="noopener noreferrer"&gt;David Xu&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Skill: &lt;a href="https://clawhub.ai/david3xu/linkedin-poster" rel="noopener noreferrer"&gt;clawhub.ai/david3xu/linkedin-poster&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>openclaw</category>
      <category>linkedin</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
