Quick Start
Get started with the Links SDK in minutes.
Installation
Install the SDK package using your preferred package manager.
npm install @links/sdkGet Your Credentials
Before making any requests, you must retrieve your API Key from the Financial Accounting Hub.
Setup & Usage
Follow these steps to initialize the client and make your first request.
Initialize the Client
Import LinksSDK and create a new instance. You can authenticate using an apiKey or an accessToken.
import { LinksSDK } from '@links/sdk';
export const client = new LinksSDK({
// Your API Key / Bearer Token
apiKey: '<YOUR_API_KEY_OR_BEARER_TOKEN>',
});Make a Request
Use the typed API instances (like unifiedContactsApi or unifiedCustomerApi) to interact with resources.
import { client } from '@/lib/links';
async function getContacts() {
try {
// Fetch paginated contacts
const response = await client.unifiedContactsApi.getPaginatedUnifiedContactList(
1, // page
10 // limit
);
return response.data;
} catch (error) {
console.error('Failed to fetch contacts:', error);
return null;
}
}