Socket
Socket
Sign inDemoInstall

loopback-connector-sms-generic

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    loopback-connector-sms-generic

generic loopback connector for SMS


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
420 kB
Created
Weekly downloads
 

Readme

Source

loopback-connector-sms-generic

Generic SMS connector for LoopBack

Installation

In your LoopBack project:

$ npm install --save loopback-connector-sms-generic

Using the Connector

To use the connector, define the datasource using the connector in your datasources.json file:

"SMSGeneric": {
    "name": "SMSGeneric",
    "connector": "loopback-connector-sms-generic",
    "url": "YOUR_SMS_PROVIDER_API_URL",
    "username": "YOUR_SMS_PROVIDER_USERNAME",
    "password": "YOUR_SMS_PROVIDER_PASSWORD"
}

Next, attach the created datasource to a model in the model-config.json file:

"SMSModel": {
    "dataSource": "SMSGeneric",
    "public": false
}

Now, using the created model, you can send an SMS or make a call using the send method of the model:

SMSModel.send(options, callback);

Note: options is defined by the JSON objects in the next two sections:

Sending a SMS Payload

All required query string parameters to be sent other than credentials in form of an object, for example:

{
    number: 'Target Number',
    ... ,
    message: 'Text Massage'
}

Version

0.1.0

License

MIT

Keywords

FAQs

Last updated on 28 Jun 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc