Termii-node helps you set up, test, and manage your Termii integration directly in your Node.js App. The Idea here is to simplify the process of interacting with the termii endpoints with ease.
You can install the package via NPM or Yarn:
npm install termii-node
OR
yarn add termii-node
- Example
import {getBalance} from 'termii-node';
- getBalance
- getMessageHistory
- getNumberStatus
- searchPhoneNumber
- getSenderId
- requestSenderId
- sendMessage
- sendMessageBulk
- sendToken
- sendVoiceCall
- sendInAppToken
- verifyToken
Note: This termii node package ACCEPTS an object as parameter and returns a promise. The object key value pair is based on termii's own parameters.
- e.g:
sendMessage({ api_key: process.env.API_KEY, to: '2347052980452', from: 'TERMI02', channel: 'generic', sms: 'Hey chief, this is just a simple sms from termii' })
Every method call MUST be passed your termii API KEY. Hence, you can either set it directly or as a variable (Not recommended) as it can be exposed to the public.
The recommended way is to set it in your environment variables and call via process.env.API_KEY
(Highly recommended)
- You can check your termii balance.
- Run
getBalance()
and pass appropriate params
- You can check reports for messages sent across the sms, voice & whatsapp channels.
- Run
getMessageHistory()
and pass appropriate params
- You can check if a number is fake or has ported to a new network.
- Run
getNumberStatus()
and pass appropriate params
- You can verify phone numbers and automatically detect their status.
- Run
searchPhoneNumber()
and pass appropriate params
- You can retrieve the status of all registered sender ID.
- Run
getSenderId()
and pass appropriate params
- You can request a new sender ID.
- Run
requestSenderId()
and pass appropriate params
- You can send a message.
- Run
sendMessage()
and pass appropriate params
- You can send bulk messages.
- Run
sendMessageBulk()
and pass appropriate params. In this case, the the receiver is an array of strings.
- You can send OTP Token
- Run
sendToken()
and pass appropriate params
- You can send OTP Token
- Run
sendVoiceToken()
and pass appropriate params
- You can send OTP
- Run
sendVoiceCall()
and pass appropriate params
- You can verify or validate OTP
- Run
verifyToken()
pass appropriate params
- You can send In-App OTP
- Run
sendInAppToken()
and pass appropriate params
The MIT License (MIT). Please see License File for more information.