UNPKG

@davidbolaji/termii-node

Version:

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

22 lines (21 loc) 577 B
/** * Service for handling Email OTP operations */ export class EmailTokenService { constructor(http) { this.http = http; } /** * Send an OTP to a user's email address * * @param payload - Request payload containing API key, email, code, and config ID * @returns Expanded `SendEmailTokenResponse` with details about the sent OTP */ async sendEmailToken(payload) { return this.http.request("/email/otp/send", { method: "POST", data: payload, authLocation: "body" }); } }