🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

verimor-node-sdk

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

verimor-node-sdk

The node client for verimor api.

0.1.1
latest
Source
npm
Version published
Maintainers
1
Created
Source

verimor-node-sdk

The node client for verimor api.

This repository is a rest client written in node for verimor api. REST documentation can be found at: https://github.com/verimor/SMS-API

Requirements

  • node.js
  • [https://verimor.com.tr](A verimor) account.
  • Enable API transactions, create an API password, enter allowed IP addresses.
  • Make sure you have enough balance to send sms messages.

Installation

npm i verimor-node-sdk

Usage

There are many endpoints available in the official api. This library contains only sending sms.

Sending SMS

Get client:

const sdk = require('verimor-node-sdk')
const client = sdk.createClient({
  username: '',
  password: ''
})

Send:

const payload = {
  source_addr: '' /* Your registered phone number or title */,
  messages: [
    {
      msg: 'Hello. This is a test message.',
      dest: '905556667788,905557778899'
    }
  ]
}
const result = await client.send(payload)
if (result.error) {
  // fail, read the error message in result.error
}
else {
  // success
  const id = result.id
}

Tests

Tests are written in tests folder and can be run with npm test. You need to create your own credentials file in credentials/credentials.json

Thanks for watching 🐬

ko-fi

Keywords

sms

FAQs

Package last updated on 07 Mar 2021

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