New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@appsolutely/gatewayapi

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@appsolutely/gatewayapi

Node Gatewayapi SMS API wrapper

  • 1.0.1
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6
Maintainers
2
Weekly downloads
 
Created
Source

@appsolutely/gatewayapi

Node library for Gatewayapi.com

For documentation of the API, see Gatewayapi.com

This is not gatewayapi's official node library.

Installation


npm install @appsolutely/gatewayapi

Loading and configuring the module


// CommonJS
const gatewayapi = require('@appsolutely/gatewayapi');
gatewayapi.setApiToken('YOUR GATEWAYAPI TOKEN')

// ES Module
import * as gatewayapi from '@appsolutely/gatewayapi';
gatewayapi.setApiToken('YOUR GATEWAYAPI TOKEN')

Send SMS

const payload: gatewayapi.payloadObject = {
        sender: 'exampleSender',
        message: "Example message string to %FIRSTNAME% %LASTNAME%",
        callback_url: 'https://api.example.com/callback',
        userref: '123abc',
        tags: ['%FIRSTNAME%', '%LASTNAME%'],
        recipients: [
            {
                msisdn: 4712345678,
                tagvalues: ['Barack', 'Obama']
            },
        ],
}

gatewayapi.sendSMS(payload).then(response => {
    //Do something with the response
}).catch(error => {
    //Do something with the error
})

Check balance

gatewayapi.checkBalance(payload).then(response => {
    //Do something with the response
}).catch(error => {
    //Do something with the error
})

Keywords

FAQs

Package last updated on 18 Dec 2020

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc