# Install and verify

## Before you start

- `node`: `>=20`.

Use a project with a `package.json`. Check the runtime and package manager:

```bash
node --version
npm --version
```

## Install the documented version

```bash
npm install @qentrah/whatsapp@0.1.3
```

## Confirm the installation

```bash
npm ls @qentrah/whatsapp
```

The output should show `@qentrah/whatsapp@0.1.3`. Commit the lockfile so another developer installs the same dependency tree.

## Quickstart

```ts
import { WhatsAppClient } from "@qentrah/whatsapp";

const whatsapp = new WhatsAppClient({
  accessToken: process.env.WHATSAPP_ACCESS_TOKEN!,
  phoneNumberId: process.env.WHATSAPP_PHONE_NUMBER_ID!,
  wabaId: process.env.WHATSAPP_WABA_ID,
  appId: process.env.META_APP_ID,
  appSecret: process.env.META_APP_SECRET,
  verifyToken: process.env.WHATSAPP_VERIFY_TOKEN,
});

await whatsapp.messages.sendText("201234567890", "Hello from WhatsApp Cloud API");
```

## Expected result

The send promise returns Meta’s accepted message response. Delivery is a separate event reported through webhooks. Replace the example recipient with a permitted test recipient in your Meta setup.