Skip to main content

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 fetch API. 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.
You can find your API key and Instance ID in the Hypersender dashboard
Hypersender Dashboard API Key

Installation

1

Install the SDK via npm

Run the following command in your terminal to install the Hypersender Node SDK:
After installation, you can verify the package is listed in your package.json file.
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:
Learn how to get the Hypersender whatsapp API token and Instance ID from Dashboard: Demo Link.
For SMS API, set the following environment variables in your .env file:
Learn how to get the Hypersender SMS API token and Instance ID from the dashboard: Demo Link.
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 with Hypersender.configure() before your first call:
To work with more than one account at the same time, create a client for each one with 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.
Last modified on November 23, 2026