简体   繁体   中英

Should i buy a twilio phone to send SMS?

I am using this code for testing to send SMS everything work but i want to know if i have to buy a twilio phone to put it inside from: "" Because I want to send real SMS to my client

export const sendReservationConfirmationSMSTwilio = async ({
      firstName,
      reservationId,
      phone,
      date,
      hour,
      totalPersons,
    }) => {
      client.messages.create({
        body: `Bonjour, nouvelle réservation ${reservationId}! ${firstName} est joignable au ${phone}. Date: ${date} à ${hour}. Couverts: ${totalPersons} Commande: voir tableau de réservation`,
        from: '+15005550006',
        to: `+33${phone.slice(1)}`,
      }).then((res) => console.log(res)
    };

Thanks !

Twilio developer evangelist here.

If you want to send SMS messages to your clients, you will need to either buy a number from Twilio , port in your existing phone number , or use an alphanumeric sender ID .

Otherwise, you seem like you are well on your way to successfully sending SMS messages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM