Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@calculusky/meta-whatsapp-sdk
Advanced tools
Readme
The SDK is a light weight package with zero dependency written in TypeScript to simplify access to the meta whatsApp cloud API, Cloud API. The SDK currently supports most features for the messaging API such as template, text, image, video, document etc.
pnpm install @calculusky/meta-whatsapp-sdk
#or
npm install @calculusky/meta-whatsapp-sdk
#or
yarn add @calculusky/meta-whatsapp-sdk
First, obtain your credentials such as the Access Token and Phone number ID from the Meta Developer Platform
CommonJS Usage
Note: In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS, use require().default as seen below:
const WhatsApp = require("@calculusky/meta-whatsapp-sdk").default;
const whatsApp = new WhatsApp({
accessToken: ACCESS_TOKEN
phoneNumberId: PHONE_NUMBER_ID,
});
TypeScript Usage
import WhatsApp from "@calculusky/meta-whatsapp-sdk";
//ES6
whatsApp.message
.template({
recipient: "2347035549057",
body: {
language: {
code: "en_US",
},
name: "hello_world",
},
})
.then((resData) => {
console.log(resData);
})
.catch((error) => {
console.log(error);
});
//ES8
try {
await whatsApp.message.template({
recipient: "2347035549057",
body: {
language: {
code: "en_US",
},
name: "hello_world",
},
});
} catch (error) {
console.log(error);
}
FAQs
Meta WhatsApp SDK for the Cloud API
The npm package @calculusky/meta-whatsapp-sdk receives a total of 1 weekly downloads. As such, @calculusky/meta-whatsapp-sdk popularity was classified as not popular.
We found that @calculusky/meta-whatsapp-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.