The Unipile Node.js SDK (version 1.9.3) provides a unified interface for integrating with multiple communication platforms, including LinkedIn, WhatsApp, Instagram, Telegram, and a generic Email API. It allows developers to programmatically manage social connections, send and receive messages (including LinkedIn InMail), retrieve user and company profiles, handle invitations, manage posts, and control email communications. This SDK is particularly useful for applications requiring multi-channel outreach, unified inboxes, or automation across various professional and messaging platforms, abstracting the complexities and individual APIs of each service. The SDK is actively maintained with regular updates reflecting new features and API changes across its supported providers.
npm install unipile-node-sdkVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the Unipile client, generate a hosted authentication link for account connection, and retrieve a LinkedIn company profile using environment variables for secure credential management.
Upgrade your Node.js runtime environment to version 18 or later.
Store Unipile DSN and Access Tokens securely as environment variables (e.g., `process.env.UNIPIL_DSN`, `process.env.UNIPIL_ACCESS_TOKEN`) and access them only on the server-side.
Implement robust rate-limiting and back-off strategies in your application. Monitor API usage and adhere to Unipile's and the underlying platforms' recommendations. Use real accounts, avoid suspicious behavior, and inform users about automated actions.
Carefully follow the Unipile documentation for each provider's authentication method. For automated methods (e.g., username/password), ensure robust error handling for 2FA/OTP challenges.
Regularly update the `unipile-node-sdk` to the latest version. Monitor Unipile's changelog and documentation for updates regarding provider API changes.
Verify your `UNIPIL_DSN` configuration. Check network connectivity and Unipile's service status page. Ensure your firewall isn't blocking outgoing connections.
Ensure your `UNIPIL_ACCESS_TOKEN` is correct and current. If an account is disconnected, prompt the user to re-authenticate via the hosted authentication flow.
Implement exponential back-off and retry logic for API calls. Review and adjust your application's usage patterns to stay within documented rate limits.
Ensure you are using `import { UnipileClient } from 'unipile-node-sdk';` and that your `package.json` specifies `"type": "module"` or your file uses `.mjs` extension for ESM. Verify the client is initialized before calling methods.Verify that the `account_id` used in the API call is valid and corresponds to an actively connected account for the specific provider (e.g., LinkedIn for `getCompanyProfile`). Double-check stored `account_id` values.
No dependency data recorded yet.