r/webdev • u/pavlito88 • 17h ago
I reverse-engineered LinkedIn's private API so Claude and ChatGPT can use it
linkedin has no public api for reading your own notifications, messages or comments. so i spent the last 3 months figuring out the private one their website uses
things i learned the hard way:
- its not one api. its three. old REST endpoints, GraphQL, and React Server Components actions from their new web app
- the csrf-token header has to equal your JSESSIONID cookie. otherwise a bare 403, no explanation
- comment with the id the feed gives you and it doesnt work. you need the activity id
- the REST comments endpoint quietly skipped 5 of 6 comments on a post. GraphQL returns all of them
- pinning a comment can return 200 with "errors": [] and change nothing. now i check that something actually changed
- the feed returns random posts unless you add sortOrder=RELEVANCE
- i tested too fast once and linkedin rate limited my own account. now its one request at a time per user, with pauses
how its built:
- an MCP server holds all the linkedin knowledge: endpoints, request shapes, parsing
- a chrome extension that knows nothing. it runs the request from your own browser session and hands back raw json. no passwords, nothing logs in from a server
- so when linkedin changes something, i fix it on the server. 20 fixes in the last 3 weeks, 0 extension updates
whats the weirdest thing you found reverse engineering a site?
0
Upvotes



