0.1.7 • Published 10 months ago

@adlanarifzr/whatsapp-sdk v0.1.7

Weekly downloads
-
License
Unlicense
Repository
github
Last release
10 months ago

Whatsapp Cloud API unofficial SDK

This repository contains the open source Node.js client for Whatsapp Cloud API. At the moment, it is focusing on handling /messages endpoint APIs and webhook. More will be updated.

Installation

npm install @adlanarifzr/whatsapp-sdk

Usage

import WhatsappSdk from '@adlanarifzr/whatsapp-sdk';

// Initialized class
const wa = new WhatsappSdk({
	phone_number_id: PHONE_NUMBER_ID,
	auth_token: AUTH_TOKEN,
});

// Send template message (also support other type of messages)
const result = await wa.sendTemplateMessage('+60123456789', {
	name: 'hello_world',
	language: {
		code: 'en_US',
	},
});

// Calculate the cost of the message based on conversation type
const cost = wa.getMessagePrice('+60123456789', 'utility');
0.1.7

10 months ago

0.1.4

10 months ago

0.1.6

10 months ago

0.1.5

10 months ago

0.1.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.0.9

10 months ago

0.1.3

10 months ago

0.0.8

11 months ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago