Skip to content

StackVerify is a unified messaging SDK that lets developers build SMS, Email, and WhatsApp messaging in one package, including SMS relay support for developers who can’t afford cloud services

Notifications You must be signed in to change notification settings

Stackmorgan/stackverify-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

StackVerify SDK

A simple Node.js SDK to interact with the StackVerify API for sending SMS and checking message status.

Installation

npm install stackverify

Usage

import StackVerify from "stackverify";

// Initialize the SDK
const stack = new StackVerify({ apiKey: "YOUR_API_KEY" });

// Send an SMS and check status
async function main() {
  try {
    const response = await stack.sendSMS({
      recipients: ["+1234567890"], // array of phone numbers
      body: "Hello! This is a test message.",
      sender_id: "SMS"
    });
    console.log("SMS sent:", response);

    const status = await stack.getSMSStatus(response.message_id);
    console.log("SMS status:", status);

  } catch (err) {
    console.error("Error:", err.message);
  }
}

main();

Api

new StackVerify({ apiKey, baseUrl })

apiKey (string) — Your StackVerify API key (required)

baseUrl (string) — API base URL (default: https://stackverify.site/api/v1)

sendSMS({ recipients, body, sender_id })

Send an SMS.

recipients — array of phone numbers (required)

body — SMS message text (required)

sender_id — your sender ID (required)

getSMSStatus(messageId)

Get the status of a sent message.

messageId — ID returned by sendSMS (required)

Badges

MIT License GPLv3 License AGPL License

Authors

🔗 Links

linkedin twitter

About

StackVerify is a unified messaging SDK that lets developers build SMS, Email, and WhatsApp messaging in one package, including SMS relay support for developers who can’t afford cloud services

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published