@linkedctl/core
v0.5.1
Published
Core library for LinkedIn API integration
Maintainers
Readme
@linkedctl/core
Core library for LinkedIn API integration -- OAuth 2.0, HTTP client, and service layer used by linkedctl.
Installation
npm install @linkedctl/coreRequires Node.js >= 24.
API Surface
HTTP Client
LinkedInClient-- authenticated HTTP client for the LinkedIn REST API
OAuth 2.0
buildAuthorizationUrl-- construct the OAuth 2.0 authorization URLexchangeAuthorizationCode-- exchange an authorization code for tokensrefreshAccessToken-- refresh an expired access tokenrevokeAccessToken-- revoke an access token server-sidegenerateCodeVerifier/computeCodeChallenge-- PKCE helpers
Configuration
resolveConfig-- resolve a complete configuration from file + environmentloadConfigFile/validateConfig-- load and validate config filessaveOAuthTokens/saveOAuthClientCredentials/clearOAuthTokens-- persist credentialsapplyEnvOverlay-- overlay environment variables onto config
Services
getUserInfo/getCurrentPersonUrn-- fetch authenticated user infocreateTextPost-- create a text post on LinkedIngetTokenExpiry-- introspect JWT token expiry
License
Using @linkedctl/core as a library in your project: Your combined work must be licensed under AGPL-3.0 (or a compatible license).
See the main project for full documentation.
