npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@microfox/linkedin-member-data-portability

v1.4.0

Published

A TypeScript SDK for LinkedIn Member Data Portability.

Readme

LinkedIn Member Data Portability SDK

A TypeScript SDK for LinkedIn Member Data Portability.

Installation

npm install @microfox/linkedin-member-data-portability

Environment Variables

The following environment variables are used by this SDK:

  • LINKEDIN_CLIENT_ID: Your LinkedIn app's Client ID. (Required)
  • LINKEDIN_CLIENT_SECRET: Your LinkedIn app's Client Secret. (Required)
  • LINKEDIN_REDIRECT_URI: The redirect URI registered in your LinkedIn app. (Required)
  • LINKEDIN_ACCESS_TOKEN: The OAuth 2.0 access token for authenticated requests. (Required)
  • LINKEDIN_REFRESH_TOKEN: The refresh token to obtain new access tokens. (Optional)
  • SCOPES: The scopes for OAuth requests (Required)

Additional Information

To use this SDK, you need to obtain LinkedIn API credentials. Follow these steps:

  1. Go to the LinkedIn Developer Portal (https://developer.linkedin.com/) and sign in.

  2. Create a new app or use an existing one.

  3. In your app settings, find the 'Client ID' and 'Client Secret'. You'll need these for authentication.

  4. Add a redirect URI to your app settings. This should match the redirectUri you provide when initializing the SDK.

  5. Request the 'r_dma_portability_3rd_party' scope for your app to access the Data Portability APIs.

Environment Variables:

  • LINKEDIN_CLIENT_ID: Your LinkedIn app's Client ID

  • LINKEDIN_CLIENT_SECRET: Your LinkedIn app's Client Secret

  • LINKEDIN_REDIRECT_URI: The redirect URI registered in your LinkedIn app

  • LINKEDIN_ACCESS_TOKEN: The OAuth 2.0 access token for authenticated requests

  • LINKEDIN_REFRESH_TOKEN: The refresh token to obtain new access tokens (optional)

Authentication:

This SDK uses OAuth 2.0 for authentication. You need to implement the OAuth flow in your application to obtain an access token. The @microfox/linkedin-oauth package is used to handle OAuth-related operations.

Rate Limits:

LinkedIn API has rate limits, but specific details are not provided in the documentation. Implement proper error handling and retry mechanisms in your application to handle rate limiting errors.

Important Notes:

  • Always use HTTPS for all API endpoints and OAuth flows.

  • Keep your Client Secret and access tokens secure. Never expose them in client-side code.

  • The Member Changelog API is limited to events from the last 28 days.

  • Include the 'LinkedIn-Version: 202312' header in all API requests (handled automatically by the SDK).

  • The SDK automatically validates the access token before each request. If it's invalid, you'll need to refresh it or obtain a new one.

  • For pagination in the Member Snapshot API, use the 'start' parameter (not implemented in this SDK version).

Usage Example:

import { createLinkedInSDK, LinkedInScope } from './LinkedInDataPortabilitySDK';

const sdk = createLinkedInSDK({
  clientId: process.env.LINKEDIN_CLIENT_ID!,

  clientSecret: process.env.LINKEDIN_CLIENT_SECRET!,

  redirectUri: process.env.LINKEDIN_REDIRECT_URI!,

  accessToken: process.env.LINKEDIN_ACCESS_TOKEN!,

  refreshToken: process.env.LINKEDIN_REFRESH_TOKEN,
});

// Example: Get member change logs

const changeLogs = await sdk.getMemberChangeLogs();

console.log(changeLogs);

For more detailed information about the LinkedIn DMA Data Portability APIs, refer to the official LinkedIn Developer documentation.

API Reference

For detailed documentation on the constructor and all available functions, see: