Socket
Socket
Sign inDemoInstall

@kernet/smsportal

Package Overview
Dependencies
9
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @kernet/smsportal

This library simplifies interaction with the SMSPortal API for sending SMS messages.


Version published
Maintainers
1
Install size
2.12 MB
Created

Changelog

Source

0.1.0

Minor Changes

  • 78451b1: ready

Readme

Source

SMSPORTAL

ℹ️️ Description

This TypeScript library simplifies interaction with the SMSPortal API for sending SMS messages. It provides a convenient class, SmsPortal, that handles the API authentication and sending of SMS messages, making it easy to integrate SMS functionality into your TypeScript or JavaScript applications.


🔧 How to Install

Install using npm:

npm install @kernet/smsportal

Install using yarn:

yarn add @kernet/smsportal

Install using pnpm:

pnpm add @kernet/smsportal

👨🏻‍🏫 How to Use

Get full details

import { SmsPortal, SmsMessage , ApiResponse } from "@kernet/smsportal";

const apiKey = 'your-api-key';
const apiSecret = 'your-api-secret';

const smsClient = new SmsPortal(apiKey, apiSecret);

const messages: SmsMessage[] = [{ content: 'Hello SMS World from NodeJS', destination: phone }]

// ApiResponse is Implicit
smsClient.sendSMS(message)
  .then((response: ApiResponse) => {
    console.log("Success:");
    console.log(response);
  })
  .catch(error => {
    console.log("Failure:");
    console.error(error.message);
  });

💁🏻 Contributing

This is an open source project. Any contribution would be greatly appreciated! Rename .env.example to .env and add your keys. This project uses pnpm.

FAQs

Last updated on 09 Sep 2023

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