Overview
The LinkedApiAdmin class lets you manage your Linked API subscription status, seats, 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 subscription status and seatsadmin.accounts– connect, disconnect, and monitor LinkedIn accountsadmin.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– missinglinked-api-tokeninvalidLinkedApiToken– token is invalid or expiredtooManyRequests– rate limit exceeded (100 requests per 60 seconds)
For the complete HTTP API reference, see the Admin API docs.