Skip to content

💸 calculate the price of a voice minute or SMS message between any two numbers using the Twilio API

License

Notifications You must be signed in to change notification settings

kmoe/twilio-price-calculator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

twilio-price-calculator

Calculate the price of a phone number, or a voice minute or SMS message between any two numbers.

Try it out in your browser here!

All prices are in USD ($).

Quick start

npm install twilio-price-calculator --save

This module provides a promise-based API. You'll first need to initialise the price calculator client by passing in your Twilio API credentials.

var PriceCalculator = require('twilio-price-calculator');
var priceCalculator = new PriceCalculator(YOUR_ACCOUNT_SID, YOUR_AUTH_TOKEN);

priceCalculator.calculateVoicePrice(FROM_PHONE_NUMBER, TO_PHONE_NUMBER)
  .then(function(price) {
    console.log(price);
  })
  .catch(function(error) {
    console.error(error);
  });

API

calculateVoicePrice(fromPhoneNumber, toPhoneNumber)

calculateSmsPrice(fromPhoneNumber, toPhoneNumber)

calculatePhoneNumberPrice(desiredPhoneNumber)

About

💸 calculate the price of a voice minute or SMS message between any two numbers using the Twilio API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages