Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
whatsapp_with_token
Advanced tools
SDK for interfacing with WhatsApp Business Platform in Typescript or Node.js using the Cloud API, hosted by Meta.
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.
View the quick start documentation to learn how to use the SDK and get started.
Install the WhatsApp Business Platform SDK using yarn:
yarn add whatsapp
Or npm:
npm install whatsapp
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=
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.
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.
The WhatsApp Business Platform Node.js SDK for the Cloud API is Meta Platforms licensed, as found in the LICENSE file.
FAQs
SDK for interfacing with WhatsApp Business Platform in Typescript or Node.js using the Cloud API, hosted by Meta.
The npm package whatsapp_with_token receives a total of 3 weekly downloads. As such, whatsapp_with_token popularity was classified as not popular.
We found that whatsapp_with_token demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.