linkedin-voyager
TypeScript icon, indicating that this package has built-in type declarations

0.0.19 • Public • Published

LinkedIn Voyager SDK

Access the internal LinkedIn API

Disclaimer

LinkedIn may ban your account if you use this library. Although I can't un-ban your account, please open an issue against this repository if this happens to you. So far, I've only seen this happen while I was trying to get the login-flow correct.

Usage

import

yarn add linkedin-voyager

use

import { API, MessageDetails } from 'linkedin-voyager';
 
const api = new API('email@domain.com');
 
// You don't actually need to provide a password if you've enabled cookie persistence in
// the 'config' object passed to 'API' assuming it has a valid, non-expired sesssion.
api.setPassword('password1');
 
// Configure the SDK to echo all messages sent to the account back to the sender.
// This method returns a closure that you can call to remove the listener.
const close = await api.messaging.messages((message: MessageDetails) =>
  api.messaging.sendToConversation(
    `Stupid says "${message.body}"`,
    message.conversationId,
  ),
);
 
// Wait one hour and then close the stream.
setTimeout(close, 60 * 60 * 1000);

Features

Adding additional API methods is easy but here's what I have so far:

  • Send/receive messages
  • Send/receive message receipts and message typing indicators
  • Query for current conversations
  • Query for current user identifiers

Other cool things which may persuade you to use this SDK instead of its competitors:

  • Fully working login flow
  • Session resumption
  • Cookie persistence
  • Compatible with node and browsers
  • Realtime connections
  • Connection reuse
  • Typescript safe
  • Ephemeral password usage

Notes

The SDK does not persist passwords. Provided passwords are maintained in memory.

If you work for LinkedIn, please consider opening your official OAuth-based API for non-partnered developers. This would be ideal for all parties: Clients don't have to provide passwords, LinkedIn can govern fine-grain ACLs and rate limits, and developers would get a better experience. It would also be great if LinkedIn provided a realtime/eventstream endpoint to the official API surface so that developers don't have to resort to shortpolling.

Contributors

Scott Leland Crossen

http://scottcrossen.com
scottcrossen42@gmail.com

Special Thanks

Inspired by https://github.com/tomquirk/linkedin-api/

Readme

Keywords

none

Package Sidebar

Install

npm i linkedin-voyager

Weekly Downloads

1

Version

0.0.19

License

MIT

Unpacked Size

151 kB

Total Files

55

Last publish

Collaborators

  • scottcrossen