Edits history of script submission #1044 for ' Send MMS (twilio)'

  • deno
    import { Twilio } from "twilio";
    
    type Twilio = {
      accountSid: string;
      token: string;
    };
    
    export async function main(
      twilio: Twilio,
      body: string,
      mediaUrl: string[],
      from: string,
      to: string
    ): Promise<void> {
      const client = new Twilio(twilio.accountSid, twilio.token);
      const message = await client.messages.create({
        body: body,
        mediaUrl: mediaUrl,
        from: from,
        to: to,
      });
      console.log(message.sid);
    }
    

    Submitted by hugo697 974 days ago