smspro

1.3.0 • Public • Published

Smspro

This is created to send and recieve sms from https://www.smspro.se

Usage:

Send

const SmsPro = require('smspro')
 
const smsPro = new SmsPro({
  'customerId': '',
  'customerPassword': '',
  'username': '',
  'password': '',
  'endpoint': '',
  'from': ''
})
 
await smsPro.sendMtSms({ to: ['phoneNumber'], message: 'k-dot is amazing'})

Returns:

{
  datetime: '2018-03-16 15:58:19',
  message: 'The MT SMS request is being processed.',
  code: '0',
  status: '0',
  errorCode: '0',
  customerId: 'kdot',
  mobilectrlId: '9123812831238'
}

Parse incoming the xml-message to JSON:

smsPro.parseIncoming(xml)

Returns:

{
  message: 'Text message from mobile',
  phoneNumber: '+46708651052',
  phoneNumberNormalized: '0708651052'
}

Send flash sms

const SmsPro = require('smspro')
 
const smsPro = new SmsPro({
  'customerId': '',
  'customerPassword': '',
  'username': '',
  'password': '',
  'endpoint': '',
  'from': ''
})
 
await smsPro.sendFlashSms({ to: ['phoneNumber'], message: 'k-dot is amazing'})

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.3.0
    2
    • latest

Version History

Package Sidebar

Install

npm i smspro

Weekly Downloads

2

Version

1.3.0

License

MIT

Unpacked Size

20.8 kB

Total Files

18

Last publish

Collaborators

  • jimjardland