YellowPush SMS API - Node.js
Installation
The easiest way to install the library is using npm, a manager package for JavaScript. Simply run this in the terminal:
npm install yellowpushsms
YellowPushSMS Reference
YellowPush API needs your YellowPush credentials. You can either pass these directly to the start method (see the code below).
var yellowPushMS = ;yellowPushMSstart'username' 'password';
NOTE: For better performance you can pass credentials and the account Identifier directly to the start method (see the code below)
var yellowPushMS = ;yellowPushMSstart'username' 'password' 'accountId';
YellowPushSMS parameters:
- username: Your account user
- password: Your account password
- accountId: Your account identifier (optional)
Send an SMS
Sends a text message to one or more mobile numbers
var yellowPushMS = ;yellowPushMSstart'username' 'password' 'accountId'; var response = yellowPushMS; response;
Send Bulk SMS
Sends single, bulk text messages
var yellowPushMS = ;yellowPushMSstart'username' 'password' 'accountId'; var messages = from: 'from' to: 'mobileNumberOne' message: 'message one' from: 'from' to: 'mobileNumberTwo' message: 'message two' ; var response = yellowPushMS; response;
Gets message status
Gets the messages satatus
var yellowPushMS = ;yellowPushMSstart'username' 'password' 'accountId'; var response = yellowPushMS response;