npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

whatsapp-mdf

v0.0.7-Alpha

Published

SDK for interfacing with WhatsApp Business Platform in Typescript or Node.js using the Cloud API, hosted by Meta.

Downloads

173

Readme

WhatsApp Business Platform Node.js SDK for the Cloud API, hosted by Meta


Status

THIS PROJECT IS ARCHIVED.

To learn more about reasons why we stopped the development of this SDK, visit this GitHub issue.


Welcome to SDK for the WhatsApp Business Platform. This SDK is written for Node.js framework to simplify access to the Cloud API. The source code itself is written in Typescript with TypeScript declaration files to type-check usage of the WhatsApp Business Platform Node.js SDK in your code, along with hints and code completion in TypeScript compatible IDEs.

lint, prettify, spellcheck, test, and build generate docs

Getting started

View the quick start documentation to learn how to use the SDK and get started.

Installation

Install the WhatsApp Business Platform SDK using yarn:

yarn add whatsapp

Or npm:

npm install whatsapp

Configuration

The SDK uses environmental variables for setting all the configuration. For development purposes, you can use a .env file at the root of your project. Below are all the possible options for the SDK configuration and only some are required for certain features.

# The base URL to send all SDK requests to (default graph.facebook.com).
# This variable should not be used unless necessary for development or special routing needs.
WA_BASE_URL=

# Your Meta for Developers app Id.
M4D_APP_ID=

# Your Meta for Developers Business app secret.
M4D_APP_SECRET=

# Your WhatsApp phone number Id (sender).
WA_PHONE_NUMBER_ID=

# Your WhatsApp business account Id.
WA_BUSINESS_ACCOUNT_ID=

# System user access token. Recommended: Do not use a temporary access token.
CLOUD_API_ACCESS_TOKEN=

# Cloud API version number.
CLOUD_API_VERSION=v16.0

# Customize your incoming webhook listener endpoint. Path should be
# https://{host}/{WEBHOOK_ENDPOINT}. A trailing slash is not added by default,
# so the variable should include that if it's required by your API gateway.
WEBHOOK_ENDPOINT=

# A custom verification token string to validate incoming webhook payloads.
# Needs to match webhook configuration.
WEBHOOK_VERIFICATION_TOKEN=

# Override the default app listener port (port 3000).
LISTENER_PORT=

# Turn on global debug logging
DEBUG=

# The number of request retries after waiting (default 30 retries)
MAX_RETRIES_AFTER_WAIT=

# The timeout period in milliseconds for a request to wait for a response (default 20000ms)
REQUEST_TIMEOUT=

Code of Conduct

Meta has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.

Contribute

See the CONTRIBUTING file for our development process, how to propose bugfixes and improvements, and how to build and test your changes to the WhatsApp Business Platform Node.js SDK.

License

The WhatsApp Business Platform Node.js SDK for the Cloud API is Meta Platforms licensed, as found in the LICENSE file.