Skip to main content

Getting Started

Executing workflows

This guide explains how to authorize with the Linked API using the SDK. Authorization is required to access both Account API and Data API endpoints.

Getting API tokens

Before using the SDK, you need to obtain API tokens from the Linked API dashboard. The tokens you need depend on which APIs you plan to use:

  • Account API authorization: Requires both accountApiToken and identificationToken
  • Data API authorization: Requires only dataApiToken
💡
Note: Account API requires connecting at least one LinkedIn account to your Linked API dashboard to generate the identificationToken. Each connected LinkedIn account has its own unique identification token.

Basic authorization

Initialize the SDK with your API tokens:

import LinkedApi from "linkedapi-node";

const linkedapi = new LinkedApi({
  accountApiToken: "your-account-api-token",
  identificationToken: "your-identification-token",
  dataApiToken: "your-data-api-token",
});
# Python SDK is coming soon!
#
# You can always use Account API or Data API directly
# https://linkedapi.io/docs/
// Go SDK is coming soon!
//
// You can always use Account API or Data API directly
// https://linkedapi.io/docs/

Multiple LinkedIn accounts

If you manage multiple LinkedIn accounts, you can create separate SDK instances for each account:

import LinkedApi from "linkedapi-node";

// Account 1
const accountApi1 = new LinkedApi({
  accountApiToken: "your-account-api-token",
  identificationToken: "your-identification-token1",
});

// Account 2  
const accountApi2 = new LinkedApi({
  accountApiToken: "your-account-api-token",
  identificationToken: "your-identification-token2",
});

// Use different accounts for different operations
await accountApi1.account.sendConnectionRequest({
  personUrl: "https://www.linkedin.com/in/person1",
  message: "Hello from Account 1!",
});

await accountApi2.account.sendConnectionRequest({
  personUrl: "https://www.linkedin.com/in/person2", 
  message: "Hello from Account 2!",
});
# Python SDK is coming soon!
#
# You can always use Account API or Data API directly
# https://linkedapi.io/docs/
// Go SDK is coming soon!
//
// You can always use Account API or Data API directly
// https://linkedapi.io/docs/