LinkedIn bridge
The LinkedIn bridge installed by us is powered by mautrix-linkedin.
Usage¶
LinkedIn ships no messaging API, so the bridge borrows your browser session and talks to LinkedIn as you. Your messages land in Matrix rooms. What you type goes back out.
When the bridge goes quiet¶
Borrowed sessions expire, and LinkedIn does not announce it. Messages stop arriving, the bot keeps answering you normally, and nothing anywhere says a word. You find out when a conversation you were waiting on stays empty.
Sessions running out is just the weather here. Come back to this page, send login, and walk the steps again.
Invite the bot to a management room¶
Start a chat with @linkedinbot:your-server.com to create a management room.
Replace your-server.com with your actual base domain. Leaving it as your-server.com or example.com will not work.
The bot posts a confirmation to the room. That is your signal to log in.
The browser trap¶
Two things about your browser decide whether the login works at all, and both of them fail in silence. Read them here, because down in the steps they are numbers 2 and 6, and by the time you hit the second one you will have forgotten the first.
LinkedIn ties a session to the browser that created it, and the bridge introduces itself as Chrome on Linux. Copy your cookies out of Firefox and LinkedIn voids them the moment the bridge tries to use them.
A live browser window also keeps rotating that session, including out from under the cookie you just copied. So the window has to be shut before the cookie goes anywhere.
Chrome, incognito, closed before you paste. Miss one and the bridge never connects, with no error to tell you which one you missed.
Authentication¶
You are about to copy a cURL command out of browser devtools and paste it to a bot, which reads exactly as sketchy as it sounds.
Would rather not touch cURL? The bot also takes your li_at and JSESSIONID cookies as a JSON object. Same steps, you just send those two values instead of the whole command.
- Send
loginto the bridge bot. - Open a private/incognito window in Chrome, per the browser trap above.
- Log in to LinkedIn normally in that window.
- In developer tools, open the “Network” tab, filter to “XHR”, and find a
graphqlrequest. - Right-click it, choose Copy, then “Copy as cURL”.
- Close the private window before you paste, per the browser trap above.
- Send the cURL command to the bot.
⚠️ That cURL command carries a working key to your entire LinkedIn account, your inbox and your profile included. Paste it only in your private room with the bot, never in a room that is bridged or shared with anyone else, and delete the message once the bot confirms.
The bot replies with the account name it logged in as, and your recent conversations start showing up as rooms. The rest arrive as messages come in.
Useful commands¶
Send help to the management room and the bot lists everything it supports. The ones you will actually reach for:
login: authenticate the bridge, or re-authenticate once the session expires.logout: disconnect your LinkedIn account from the bridge.search <query>: search for people on LinkedIn.start-chat <identifier>: open a direct chat with someone.
Power up with LinkedIn bridge
Start using LinkedIn bridge today - get a managed Matrix server with it pre-installed, or add it to your existing setup.