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

fast2sms

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fast2sms

A Fast2SMS helper library for NodeJS

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
56
Maintainers
1
Weekly downloads
 
Created
Source

NodeJS library for sending SMS in India using Fast2SMS

Quick start

Make sure you have Node version >= 8.0

$ npm i -S fast2sms
var fast2sms = require('fast2sms');
var options = {API_KEY:YOUR_API_KEY};
fast2sms.init(options)
fast2sms.send({ message: 'The SMS content e.g. "This is a message from Fast2SMS"', to: TARGET_PHONE_NUMBER }).then(function (data) {
    console.log('data................', data);
}).catch(function (error) {
    console.log('err.................', error);
})

Details

YOUR_API_KEY = FIND THIS API KEY INSIDE https://www.fast2sms.com/dashboard/dev-api 
TARGET_PHONE_NUMBER = 'Target numbers separated by comma, e.g. 8962239013,7773854335'

Optional settings

You can also add these to options variable

sender_id -     A custom name for SMS sender
language  -     english / unicode (Unicode supports other languages such as Hindi) 
route     -     qt: Quick transactional
                q: Promotional  
                t: Transactional
variable  -     For 5 characters: 5 = {#AA#} 
                For 10 characters: 10 ={#BB#} 
                For 15 characters: 15 ={#CC#} 
                For 20 characters: 20 ={#DD#} 
                For 25 characters: 25 ={#EE#} 
                For 30 characters: 30 ={#FF#}
variable_value -Your value for the template variable
message   -     If you are using templates message = template_id 

You may find your template_id here https://www.fast2sms.com/dev/quick-templates?authorization=YOUR_AUTHORIZATION_KEY

Keywords

FAQs

Package last updated on 14 May 2018

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