@davidbolaji/termii-node
Version:
Node.js SDK for Termii API – send SMS, voice, OTP, and manage messaging with ease.
26 lines (25 loc) • 716 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VerifyTokenService = void 0;
/**
* Service for verifying OTP tokens
*/
class VerifyTokenService {
constructor(http) {
this.http = http;
}
/**
* Verify an OTP token by checking its pinId and PIN code
*
* @param payload - Request payload containing apiKey, pinId, and pin
* @returns Expanded `VerifyTokenResponse` with verification status
*/
async verifyToken(payload) {
return this.http.request("/sms/otp/verify", {
method: "POST",
data: payload,
authLocation: "body"
});
}
}
exports.VerifyTokenService = VerifyTokenService;