Socket
Socket
Sign inDemoInstall

greensms

Package Overview
Dependencies
29
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    greensms

GREENSMS API: SMS, Viber, Voce, Call, HLR, Pay


Version published
Maintainers
1
Created

Readme

Source

greensms-node

NPM

GitHub release (latest by date) GitHub Workflow Status Coveralls github Codacy Badge

Documentation

The documentation for the GREENSMS API can be found here.

Supported Node.js Versions

This library supports the following Node.js implementations:

  • Node.js 8
  • Node.js 10
  • Node.js 12
  • Node.js 14

TypeScript is supported for TypeScript version 2.9 and above.

Installation

npm install greensms --save

Sample Usage

Check out these code examples in JavaScript and TypeScript to get up and running quickly.

var username = process.env.GREENSMS_USERNAME; // Your Account Login from my.greensms.ru
var password = process.env.GREENSMS_PASSWORD;   // Your Account Password from my.greensms.ru

const greensms = require('greensms')(username, password);
greensms.sms.send({
    to: '79262345678',
    txt: 'Message to deliver',
  })
  .then((response) => {
    console.log("Request ID: %", response.request_id);
  })
  .catch((err) => {
    console.error(err);
  });

Environment Variables

greensms-node supports credential storage in environment variables. If no credentials are provided when instantiating the GreenSMS client (e.g., const client = require('greensms')();), the values in following env vars will be used: GREENSMS_USERNAME/GREENSMS_PASSWORD OR GREENSMS_TOKEN.

Token Auth

Methods

Handling Exceptions

For an example on how to handle exceptions in this helper library.

Getting help

If you need help installing or using the library, please contact us: support@greensms.ru.

If you've instead found a bug in the library or would like new features added, go ahead and open issues or pull requests against this repo!

Contributing

Bug fixes, docs, and library improvements are always welcome. Please refer to our Contributing Guide for detailed information on how you can contribute. If you're not familiar with the GitHub pull request/contribution process, this is a nice tutorial.

Getting Started

If you want to familiarize yourself with the project, you can start by forking the repository and cloning it in your local development environment. The project requires Node.js to be installed on your machine.

After cloning the repository, install the dependencies by running the following command in the directory of your cloned repository:

npm install

You can run the existing tests to see if everything is okay by executing:

npm test

Keywords

FAQs

Last updated on 23 Oct 2020

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