wacloudwrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

tests

Whastsapp Cloud API Wrapper

whatsapp-cloud-api-wrapper is a Node.js. Currently, it supports only sending messages to users.

Installation

NPM

npm i wacloudwrapper

Usage

import { WhatsappAPI } from 'wacloudwrapper'

// create object that can be used to send messages
const messenger = new WhatsappAPI('YOUR_ACCESS_TOKEN', 'YOUR_SENDER_PHONE_NUMBER_ID')

//send a text message
await messenger.sendText(to, 'Welcome to our service!')

Examples

// send text message
await messenger.sendText(to, 'Welcome to our service!')

// send template message
await messenger.sendTemplate(to, 'hello_world', 'en')

//send a document
await messenger.sendDocument(to, 'https://www.example.com/file.pdf')

API Support

  • [x] Sending Text Messages
  • [x] Sending Documents
  • [x] Sending Template Messages
  • [ ] Sending Image, Audio Video Messages
  • [ ] Recieving messages

Dependents (0)

Package Sidebar

Install

npm i wacloudwrapper

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

21.5 kB

Total Files

30

Last publish

Collaborators

  • zorgan