https://github.com/hyperjumptech/whatsapp-business-sender
Node.js library for sending message through Whatsapp Business API
https://github.com/hyperjumptech/whatsapp-business-sender
nodejs typescript whatsapp
Last synced: about 1 year ago
JSON representation
Node.js library for sending message through Whatsapp Business API
- Host: GitHub
- URL: https://github.com/hyperjumptech/whatsapp-business-sender
- Owner: hyperjumptech
- License: mit
- Created: 2021-04-08T08:27:23.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-04-24T01:33:56.000Z (about 5 years ago)
- Last Synced: 2025-03-25T19:12:48.390Z (about 1 year ago)
- Topics: nodejs, typescript, whatsapp
- Language: TypeScript
- Homepage:
- Size: 5.7 MB
- Stars: 11
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCTS.md
Awesome Lists containing this project
README
# **Whatsapp Business Sender**
Whatsapp Business Sender is the library for sending whatsapp for business message api using node js.
## **Built With**
- [Nodejs](https://nodejs.org/en/)
- [Axios](https://github.com/axios/axios)
- [Typescript](https://www.typescriptlang.org)
## **Getting Started**
### Prerequisites
- Node.js v^14.14.37
- npm v6.14.11
### Installing
```bash
npm install @hyperjumptech/whatsapp-business-sender
```
## **Libraries**
### Exposed Libraries
```
- loginUser
- checkContacts
- sendMessageTemplateText
```
### Descriptions
**_loginUser_**
The method to run login-user endpoint in the Whatsapp Business API :
- baseURL : Whatsapp business api server host
- creds : Whatsapp business user credentials, consist of username and password
_usage:_
```js
import whatsapp from "@hyperjumptech/whatsapp-business-sender";
const resp = await whatsapp.loginUser("", {
username: "",
password: "",
});
```
**_checkContacts_**
The method to run check-contacts endpoint in the Whatsapp Business API :
- baseURL : Whatsapp business api server host
- token : token from the user login
- phones : string arrays of phone number using country code
_usage:_
```js
import whatsapp from "@hyperjumptech/whatsapp-business-sender";
const resp = await whatsapp.checkContacts("", "", [
"",
"",
"",
]);
```
**_sendMessageTemplateText_**
The method to run send-message-template-text endpoint in Whatsapp Business API :
- baseURL : Whatsapp business api server host
- token : token from the user login
- data : consist of phone number and template configurations
_usage:_
```js
import whatsapp from "@hyperjumptech/whatsapp-business-sender";
const resp = await whatsapp.sendMessageTemplateText(
"",
"",
{
phone: "",
template: {
namespace: "",
name: "",
language: {
policy: "",
code: "",
},
components: [
{
type: "body",
parameters: [
{
type: "",
text: "",
},
],
},
],
},
}
);
```
## Discussions
If you need help, want to give feedback, or have a great idea to improve this library, get involved! Let us know in the [Github discussions](https://github.com/hyperjumptech/whatsapp-business-sender/discussions).
Please abide by the [Contributor's Code of Conduct](CODE_OF_CONDUCTS.md)
## License
[MIT](./LICENSE.txt) License.