Registry / messaging / coolsms-rest-sdk

coolsms-rest-sdk

JSON →
library1.0.8jsnpmunverified

coolsms-rest-sdk is a Node.js SDK for the CoolSMS REST API, enabling sending SMS, LMS, MMS messages, managing sender IDs, and handling mobile originated (MO) messages. Version 1.0.8 is the latest stable release as of 2025, with no regular release cadence; it appears to be in maintenance mode. Key differentiators include a simple callback-based interface, support for Korean SMS service providers, and built-in balance checking and message cancellation. It requires an API key and secret from CoolSMS.

npm install coolsms-rest-sdk
INSTALL
IMPORT
SIG · COOLSMS-REST-SDK
C
coolsms-rest-sdk
messagingjavascriptv1.0.8
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Coolsms
const Coolsms = require('coolsms-rest-sdk');
import Coolsms from 'coolsms-rest-sdk';
This package does not support ES module imports; use CommonJS require().
Coolsms constructor
new Coolsms({ key: 'your key', secret: 'your secret' });
new Coolsms('your key', 'your secret');
The constructor expects a single object with key and secret properties, not separate arguments.
client.sms.send
client.sms.send({ to: '...', from: '...', type: 'SMS', text: '...' }, callback);
client.sms.send({ to: '...', from: '...', text: '...' });
Omitting type or missing callback may cause unexpected behavior; type must be uppercase and one of SMS, LMS, MMS.

Sends a single SMS message using credentials from environment variables.

const Coolsms = require('coolsms-rest-sdk'); const client = new Coolsms({ key: process.env.COOLSMS_API_KEY ?? '', secret: process.env.COOLSMS_API_SECRET ?? '' }); client.sms.send({ to: '01000000000', from: '0211111111', type: 'SMS', text: 'Hello from coolsms-rest-sdk!' }, function(error, result) { if (error) { console.error('Error:', error); } else { console.log('Result:', result); } });
Debug
Known issues
gotchaThe SDK does not support async/await; all methods use callbacks.
fix
Wrap in a Promise or use a callback-based approach.
affects: <=1.0.8
gotchaThe type parameter must be uppercase: 'SMS', 'LMS', or 'MMS'. Lowercase may silently fail.
fix
Use uppercase values for the type parameter.
affects: <=1.0.8
gotchaThe 'from' number must be registered and verified in CoolSMS account prior to sending.
fix
Register sender numbers via CoolSMS web console or senderID API.
affects: >=0.0.0
gotchaThis package has no TypeScript type definitions; use @types/coolsms-rest-sdk if available or declare manually.
fix
Install @types/coolsms-rest-sdk if it exists or create a .d.ts file.
affects: <=1.0.8
deprecatedThe package has not been updated since 2016-10-18 (version 1.0.8). It may use deprecated internal APIs.
fix
Consider using the official CoolSMS v2 API or a maintained fork.
affects: >=0.0.0
Errors
Common errors & fixes
Error: Invalid API key
API key or secret is incorrect or not provided.
fix
Verify COOLSMS_API_KEY and COOLSMS_API_SECRET environment variables are set correctly.
TypeError: client.sms.send is not a function
client is not properly initialized or sms resource is missing.
fix
Ensure new Coolsms({...}) is called correctly with key and secret.
Error: Unauthorized
API credentials are invalid or account lacks permissions.
fix
Check API key expiration and account balance; verify sender number registration.
Error: Not registered sender number
The 'from' number is not registered in CoolSMS account.
fix
Register the sender number via senderID.register() method or CoolSMS web console.
Upgrade
Version history
1.0.8latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
18
OpenAI (training)
1
Resources
coolsms-rest-sdk — npm install coolsms-rest-sdk · libregistry