UNPKG

@davidbolaji/termii-node

Version:

Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.

26 lines (25 loc) 711 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InAppTokenService = void 0; /** * Service for generating in-app OTP tokens */ class InAppTokenService { constructor(http) { this.http = http; } /** * Generate a new in-app OTP token * * @param payload - Request payload containing apiKey, pinType, phoneNumber, and OTP settings * @returns Expanded `InAppTokenResponse` with OTP details */ async generate(payload) { return this.http.request("/sms/otp/generate", { method: "POST", data: payload, authLocation: "body" }); } } exports.InAppTokenService = InAppTokenService;