Edits history of script submission #1060 for ' Send SMS (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,
      body: string,
      to: string,
      from: string
    ) {
      const client = new Twilio(twilio.accountSid, twilio.token);
      const message = await client.messages.create({
        body: body,
        to: to,
        from: from,
      });
      return message;
    }
    

    Submitted by hugo697 399 days ago

  • bun
    import { Twilio } from "twilio";
    
    type Twilio = {
      accountSid: string;
      token: string;
    };
    
    export async function main(
      twilio: Twilio,
      body: string,
      to: string,
      from: string
    ) {
      const client = new Twilio(twilio.accountSid, twilio.token);
      const message = await client.messages.create({
        body: body,
        to: to,
        from: from,
      });
      return message;
    }
    

    Submitted by hugo697 974 days ago