import { Twilio } from "twilio";
type Twilio = {
accountSid: string;
token: string;
};
export async function main(
twilio: Twilio,
token: string,
serviceId: string,
phoneNumber: string
) {
const client = new Twilio(twilio.accountSid, twilio.token);
const verificationCheck = client.verify.v2
.services(serviceId)
.verificationChecks.create({
to: phoneNumber,
code: token,
});
return verificationCheck;
}
Submitted by hugo697 468 days ago