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

messente_api

v2.2.0

Published

Send and receive SMS, Viber, Telegram and WhatsApp messages, blacklist phone numbers to make sure you're not sending any unwanted messages, manage contacts and groups.

Downloads

15,603

Readme

Messente API Library

  • Messente API version: 2.0.0
  • NPM package version: 2.2.0

Messente is a global provider of messaging and user verification services. * Send and receive SMS, Viber, WhatsApp and Telegram messages. * Manage contacts and groups. * Fetch detailed info about phone numbers. * Blacklist phone numbers to make sure you're not sending any unwanted messages. Messente builds tools to help organizations connect their services to people anywhere in the world.

Installation

Install Messente API library with npm install messente_api --save.

Features

Messente API has the following features:

Messente API Library provides the operations described below to access the features.

BlacklistApi

  1. Adds a phone number to the blacklist addToBlacklist
  2. Deletes a phone number from the blacklist deleteFromBlacklist
  3. Returns all blacklisted phone numbers fetchBlacklist
  4. Checks if a phone number is blacklisted isBlacklisted

BulkMessagingApi

  1. Sends a bulk Omnimessage sendBulkOmnimessage

ContactsApi

  1. Adds a contact to a group addContactToGroup
  2. Creates a new contact createContact
  3. Deletes a contact deleteContact
  4. Lists a contact fetchContact
  5. Lists groups of a contact fetchContactGroups
  6. Returns all contacts fetchContacts
  7. Removes a contact from a group removeContactFromGroup
  8. Updates a contact updateContact

DeliveryReportApi

  1. Retrieves the delivery report for the Omnimessage retrieveDeliveryReport

GroupsApi

  1. Creates a new group with the provided name createGroup
  2. Deletes a group deleteGroup
  3. Lists a group fetchGroup
  4. Returns all groups fetchGroups
  5. Updates a group with the provided name updateGroup

NumberLookupApi

  1. Requests info about phone numbers fetchInfo

OmnimessageApi

  1. Cancels a scheduled Omnimessage cancelScheduledMessage
  2. Sends an Omnimessage sendOmnimessage

StatisticsApi

  1. Requests statistics reports for each country createStatisticsReport

Auth

Type: HTTP basic authentication

Read the external getting-started article which explains API keys and Sender ID logic.

Getting started: sending an omnimessage

const MessenteApi = require('messente_api');

const defaultClient = MessenteApi.ApiClient.instance;

// Configure HTTP basic authorization: basicAuth
const basicAuth = defaultClient.authentications['basicAuth'];
basicAuth.username = 'YOUR_MESSENTE_API_USERNAME';
basicAuth.password = 'YOUR_MESSENTE_API_PASSWORD';

const api = new MessenteApi.OmnimessageApi();

const viber = MessenteApi.Viber.constructFromObject({
  text: 'Hello Viber!',
  sender: 'Messente',
});

const sms = MessenteApi.SMS.constructFromObject({
  text: 'Hello SMS!',
});

const whatsAppParameters = [MessenteApi.WhatsAppParameter.constructFromObject({type: 'text', text: 'hello whatsapp'})];
const whatsAppComponent = MessenteApi.WhatsAppComponent.constructFromObject({type: 'body', parameters: whatsAppParameters});
const whatsAppTemplate = MessenteApi.WhatsAppTemplate.constructFromObject({
  name: '<template_name>',
  language: new MessenteApi.WhatsAppLanguage(code='<language_code>'),
  components: [whatsAppComponent],
});

const whatsapp = MessenteApi.WhatsApp.constructFromObject({
  sender: "<sender name (optional)>",
  template: whatsAppTemplate,
});

const omnimessage = MessenteApi.Omnimessage.constructFromObject({
  messages: [whatsapp, viber, sms],
  to: '<recipient_phone_number>',
});

api.sendOmnimessage(omnimessage, (error, data) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ', data);
  }
});

License

Apache-2.0

Terms

https://messente.com/terms-and-conditions