
Security News
OWASP 2025 Top 10 Adds Software Supply Chain Failures, Ranked Top Community Concern
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.
Custom nodejs sdk for websms.com services
This module should be a better and stable implementation of the original websms.com sdk. https://websms.com/
No additional dependencies!
websms.js module provides an easy-to-use API for sending SMS text and binary messages through websms.com API (https://api.websms.com).
Simple examples can be found in the examples.js.
See websms.com website to register for an account.
For general API specification of the server (nodejs independent) visit: https://api.websms.com
Install with npm:
$ npm install websms
Tests are runnable after running npm install. (mocha and expect.js as devDependencies)
$ mocha spec/tests
var websms = require('websms');
var client = new websms.Client(username, password);
var TextMessage = new websms.TextMessage(unicodeMessageText, recipientAddressList);
client.send(TextMessage, maxSmsPerMessage, isTest, callback);
You don't need to use setter methods, it's also possible create a message with all properties at once:
TextMessage = new websms.TextMessage(messageContent, recipientAddressList, {
'senderAddress' : "AlphanumericSender",
'senderAddressType' : 'alphanumeric', // also possible values: 'shortcode', 'international', 'national
'sendAsFlashSms' : true,
'priority' : 1,
'notificationCallbackUrl' : 'https://my_server_for_send_notification',
'clientMessageId' : "My custom message id"
});
If there was an error during message creation -> you can find it on TextMessage.error (object with cause, message as keys). If you not check this the Client.send method will do it and calling your sending callback with that error object.
function (error, response) {
// error = {
// cause: String with error code
// message: String with error message
// }
// repsonse = if request was successfully sent -> this is the response object
var statusCode = repsonse.statusCode;
var statusMessage = repsonse.statusMessage;
var transferId = repsonse.transferId;
var clientMessageId = repsonse.clientMessageId;
};
new websms.Client(user, password)
Client.send(messageObject, maxSmsPerMessage, isTest, callback)
new websms.TextMessage(messageContent, recipientAddressList, optionalOptions)
TextMessage.getMessageContent()
new websms.BinaryMessage(messageContentSegments, recipientAddressList, userDataHeaderPresent, optionalOptions)
BinaryMessage.getMessageContent()
BinaryMessage.getUserDataHeader()
BinaryMessage.setUserDataHeader(userDataHeader)
Base class for all messages (every message inherits from Event.Emitter)
Message.getRecipientAddressList()
Message.getSenderAddress()
Message.setSenderAddress(senderAddress)
Message.getSenderAddressType()
Message.setSenderAddressType(senderAddressType)
Message.getSendAsFlashSms()
Message.setSendAsFlashSms(sendAsFlashSms)
Message.getNotificationCallbackUrl()
Message.setNotificationCallbackUrl(notificationCallbackUrl)
Message.getClientMessageId()
Message.setClientMessageId(clientMessageId)
Message.getPriority()
Message.setPriority(priority)
FAQs
A custom nodejs websms.com sdk for sending text and binary sms
The npm package websms receives a total of 2 weekly downloads. As such, websms popularity was classified as not popular.
We found that websms demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
OWASP’s 2025 Top 10 introduces Software Supply Chain Failures as a new category, reflecting rising concern over dependency and build system risks.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.