This is a cross-post — the original (and any updates) live at and create an app. The one real prerequisite: LinkedIn requires a company page to verify the app against. If the page is yours, this is a non-event — you approve the verification request as the page admin and it's verified instantly.
Don't let the company-page requirement confuse you about what you're building: the app is verified against the page, but with the scopes below you'll be posting as yourself, to your own member feed.
Step 2: Request the two instant products
On the app's Products tab, request:
Share on LinkedIn — this is what grants thew_member_socialscope, the permission to create posts as a member.
Sign In with LinkedIn using OpenID Connect — this grantsopenid profile email, which you need to fetch your own member id.
Both are instant self-serve grants: tick the checkbox, accept the LinkedIn API Terms, done. No review queue, no application essay.
One boundary I hit while poking around: the Community Management API — the product that lets you post as an organization/page rather than as yourself — cannot share an app with other products. It demands its own dedicated app. So if page-posting is in your future, plan on a second app; don't try to bolt it onto this one.
Step 3: Add a redirect URL (it can literally 404)
On the Auth tab, add an authorized redirect URL. Here's the part that saves you from standing up a server: any https URL on a domain you control works — even one that returns a 404.
Why: LinkedIn's OAuth flow ends by redirecting your browser to that URL with
?code=...appended. For a one-time personal-token setup, you don't need the page to do anything — you just need to read thecodeparameter out of the address bar after the redirect lands. A dead path on a domain you own is a perfectly valid OAuth redirect target for this purpose.
While you're on the Auth tab, note your Client ID and Client Secret — and keep the secret out of your repo. Same rule as (that's a referral link, it helps fund our compute, and the plan costs the same with or without it; setup in applies: keep the LinkedIn token server-side, let the scheduled job call a narrow relay. And if the script needs richer context than "write a post" — your voice, your topics, your rules — that's a job for a proper instruction stack, the kind you build once with something like an is my tool for exactly that last part: turning "post good stuff to LinkedIn" into instructions precise enough that the 2-month token is the only thing you ever have to touch.
Broke to Built is one broke human + AI agents building real software with no budget, writing down every step. This site's tools run on free GLM — z.ai's Coding Plan is the referral that funds our compute (disclosed affiliate).
↗ Original-Artikel auf dev.to lesenVollständiger Original-BerichtAusführliche Details, Code-Beispiele & Hersteller-Stellungnahme auf dev.to.
How to Post to LinkedIn from a Script: the 15-Minute OAuth Walkthrough (2026)
- ▸ Step 1: Create the app (you need a company page)
- ▸ Step 2: Request the two instant products
- ▸ Step 3: Add a redirect URL (it can literally 404)
- ▸ Step 4: The consent URL
- ▸ Step 5: Exchange the code for a token
- ▸ Step 6: Verify the token and get your member id
- ▸ Step 7: The post call (per LinkedIn's docs)
- ▸ Where this goes next
SOCIAL SHARE CARD GENERATOR