Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

onxy-messaging

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onxy-messaging

A Node.js module for sending WhatsApp messages using onyxberry.com/services/wapi

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by25%
Maintainers
1
Weekly downloads
 
Created
Source

Onxy Messaging

A Node.js module for sending WhatsApp messages using a third-party API.

Installation

Install the module using npm:

npm install onxy-messaging

Usage

const OnxyMessaging = require('onxy-messaging');

const yourId = 'your_id';
const apiKey = 'your_api_key';

const onxy = new OnxyMessaging(yourId, apiKey);

// Example: Sending a simple text message
onxy.sendSimpleTextMessage('recipient_number', 'Hello, this is a test message')
  .then(response => console.log(response))
  .catch(error => console.error(error));

// Other methods:
// - onxy.sendMediaFromURL('recipient_number', 'media_url', 'Optional caption')
// - onxy.sendTextInGroup('group_name', 'message')
// - onxy.sendMediaFromURLInGroup('group_name', 'media_url', 'Optional caption')


API Methods
sendSimpleTextMessage(number, message)
Send a simple text message to the specified number.

number: Recipient's phone number.
message: Text message to be sent.
sendMediaFromURL(number, url, caption)
Send images/PDF/documents, etc., from a URL to the specified number.

number: Recipient's phone number.
url: URL of the media file.
caption (Optional): Caption for the media file.
sendTextInGroup(groupName, message)
Send a text message to a WhatsApp group.

groupName: Name of the WhatsApp group.
message: Text message to be sent.
sendMediaFromURLInGroup(groupName, url, caption)
Send images/PDF/documents, etc., from a URL to a WhatsApp group.

groupName: Name of the WhatsApp group.
url: URL of the media file.
caption (Optional): Caption for the media file.
License
This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

FAQs

Package last updated on 13 Nov 2023

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc