node-aspsms
A partial implementation of the aspsms.com XML SMS API for node.js.
Installation
sudo npm install aspsms
Methods
setDefaultOptions(options)
Sets the default optionssend(options, callback, message)
Sends a text messageshowCredits(options, callback, message)
Returns the amount of credits left
Options
userkey
Your ASPSMS Uesrkeypassword
Your ASPSMS passwordoriginator
Name of the senderrecipient
Mobile phone number of the recipient
Errors
If the operation was successfull the error
object passed to the callback will
be null
. If the operation fails the error object will contain an errorCode
and an errorDescription
field with values according to the aspsms.com
documentation.
Examples
Send a text message
var aspsms = ; aspsms; aspsms;
Show how many credits you have left
var aspsms = ; aspsms; aspsms;
If you don't want to use setDefaultOptions
you can pass all options in each
command.
var aspsms = ; aspsms;