Getting Started with Hypersender SDK
This guide will walk you through the process of installing and configuring the Hypersender Node SDK for your Node.js or TypeScript application.Prerequisites
Before you begin, ensure you have the following:- Node.js 18 or higher: The SDK uses the built-in
fetchAPI. Bun 1+ and Deno are supported too. - npm, pnpm, yarn, or bun: For package management and dependency resolution
- Hypersender account: Sign up at Hypersender to obtain your API key and Instance ID.

Installation
1
Install the SDK via npm
Run the following command in your terminal to install the Hypersender Node SDK:
The package is published as an ES module. In CommonJS code, load it with
const { Hypersender } = await import("hypersender-node");.2
Configure Environment Variables
The SDK reads its credentials from environment variables, using the same names as the Laravel package. Set the variables for the APIs you use: WhatsApp, SMS, OTP, or any mix of them.
For WhatsApp API, set the following environment variables in your .env file:For SMS API, set the following environment variables in your .env file:For OTP API, set the following environment variables in your .env file:Node.js does not read
.env files on its own. Start your app with node --env-file=.env app.js (Node.js 20.6+), or load the file with a package such as dotenv before your first Hypersender call.3
Send your first message
Import the
Hypersender facade and call the API you need. It picks up the environment variables on first use.Configure in code instead of environment variables
If you can’t use environment variables, pass the credentials once withHypersender.configure() before your first call:
new HypersenderClient({ ... }). It takes the same options and has the same whatsapp, sms, and otp properties.
You’re all set!
You have successfully installed and configured the Hypersender Node SDK in your application. You can now start using the SDK to send messages and manage your communications.- WhatsApp: Usage Guide
- SMS: Usage Guide
- OTP codes (WhatsApp or SMS): OTP with Node
- WhatsApp OTP links: Generate a link with Node