Home Uncategorized

Node.js Setup

Last updated on Apr 27, 2026

Node.js setup tutorial

Automate link creation and reporting from your backend or scripts.

Before you start

  • LinkMe workspace with at least one app
  • Server/API key generated in the portal (write scope)

1. Install the package

npm install @li-nk.me/node-sdk

Package: @li-nk.me/node-sdk

2. Instantiate the client

import LinkMeClient from '@li-nk.me/node-sdk';

const linkme = new LinkMeClient({
  apiKey: process.env.LINKME_SERVER_KEY, // optional for read-only calls
});

CommonJS usage

const LinkMeClient = require('@li-nk.me/node-sdk').default;

3. Manage links programmatically

// List links for an app
const links = await linkme.listLinks('app_123');

// Create a marketing slug
await linkme.createLink({
  appId: 'app_123',
  slug: 'spring',
  deepLink: '/promo/spring',
  redirects: {
    iosStoreUrl: 'https://apps.apple.com/...',
    androidStoreUrl: 'https://play.google.com/...',
    webFallbackUrl: 'https://example.com/spring',
    forceRedirectWeb: false,
  },
});

// Update attributes later
await linkme.updateLink('spring', {
  metadata: { campaign: 'spring-2025' },
});

// Delete if needed
await linkme.deleteLink('spring');

All methods return typed responses; check their definitions in node_modules/@li-nk.me/node-sdk/dist/index.d.ts or the SDK reference.

4. Explore the source

This monorepo already includes the SDK source under sdks/node. Inspect src/linkService.ts to see each REST call and adapt it for custom tooling.

Next steps

  • Reference the generated TypeScript types (dist/index.d.ts) for the complete API surface.
  • Pair Node automation with the REST Endpoints & OpenAPI reference to build dashboards or QA workflows.