Edits history of script submission #1059 for ' Check Verification Token (twilio)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    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 399 days ago

  • bun
    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 974 days ago