1.0.5 • Published 2 years ago

wacloudwrapper v1.0.5

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

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

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