No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 9df66fa Sep 13, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs Version 1.1.0 Sep 13, 2018
src Version 1.1.0 Sep 13, 2018
test Version 1.1.0 Sep 13, 2018
.DS_Store Version 1.1.0 Sep 13, 2018 Version 1.1.0 Sep 13, 2018 Initial commit Mar 19, 2018
mocha.opts Initial commit Mar 19, 2018
package.json Initial commit Mar 19, 2018


TheSmsWorksApi - JavaScript client for the_sms_works_api The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded. This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.JavascriptClientCodegen


For Node.js

via npm

npm install the-sms-works --save

You should now be able to require('the-sms-works') in javascript files from the directory you ran the last command above from.


This library is hosted at:

you can install it from git via:

    npm install TheSMSWorks/smsw-nodejs-sdk --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
      parser: {
        amd: false

Getting Started

Please follow the installation instruction and execute the following JS code:

var TheSmsWorksApi = require('the_sms_works_api');

var api = new TheSmsWorksApi.AuthApi()

var customerid = "customerid_example"; // {String} The Customer ID

var callback = function(error, data, response) {
  if (error) {
  } else {
    console.log('API called successfully. Returned data: ' + data);
api.keySecret(customerid, callback);

Test calls in Postman

Run in Postman

Documentation for API Endpoints

All URIs are relative to

Class Method HTTP request Description
TheSmsWorksApi.AuthApi keySecret GET /auth/getApiKey
TheSmsWorksApi.AuthApi login POST /auth/token
TheSmsWorksApi.BatchMessagesApi cancelScheduledBatchJob DELETE /batches/schedule/{batchid}
TheSmsWorksApi.BatchMessagesApi getBatchById GET /batch/{batchid}
TheSmsWorksApi.BatchMessagesApi scheduleBatch POST /batch/schedule
TheSmsWorksApi.BatchMessagesApi sendBatch POST /batch/send
TheSmsWorksApi.MessagesApi cancelScheduledJob DELETE /messages/schedule/{messageid}
TheSmsWorksApi.MessagesApi getInboxMessages POST /messages/inbox
TheSmsWorksApi.MessagesApi getMessageById GET /messages/{messageid}
TheSmsWorksApi.MessagesApi getMessages POST /messages
TheSmsWorksApi.MessagesApi scheduleMessage POST /message/schedule
TheSmsWorksApi.MessagesApi sendMessage POST /message/send
TheSmsWorksApi.UtilsApi test GET /utils/test

Documentation for Models

Documentation for Authorization


  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header