Overview

The LinkedApiAdmin class lets you manage your Linked API subscription, connected LinkedIn accounts, and rate limits programmatically.

Initialization

Unlike the main SDK, the Admin class requires only your linkedApiToken – no identificationToken needed:

typescript
import { LinkedApiAdmin } from '@linkedapi/node';

const admin = new LinkedApiAdmin({
  linkedApiToken: 'your-linked-api-token',
});

The class exposes three namespaces matching the Admin API resources:

  • admin.subscription – manage plans, seats, and billing
  • admin.accounts – connect, disconnect, and monitor LinkedIn accounts
  • admin.limits – configure and monitor rate limits

Error handling

Admin methods use direct request-response (not workflows), so there is no execute() / result() pattern. Methods return data directly and throw LinkedApiError on failure:

typescript
try {
  const status = await admin.subscription.getStatus();
  console.log(status.status); // 'active', 'trialing', etc.
} catch (e) {
  if (e instanceof LinkedApiError) {
    console.error(`Error: ${e.type} – ${e.message}`);
  }
}

Common critical errors:

  • linkedApiTokenRequired – missing linked-api-token
  • invalidLinkedApiToken – token is invalid or expired
  • tooManyRequests – rate limit exceeded (100 requests per 60 seconds)

For the complete HTTP API reference, see the Admin API docs.