DEV Community

Tao Liu
Tao Liu

Posted on • Edited on

4

How to setup a Twilio Hello SMS

Go to Functions:

Alt Text

Create a SMS function:

Alt Text

exports.handler = function(context, event, callback) {
    context.getTwilioClient().messages.create({
      to: '+1253xxxxxxx',         
      from: '+1256906xxxx',       //twilio number
      body: 'New Student Recieved'
    }).then(msg => {
      callback(null, msg.sid);
    }).catch(err => callback(err));
  }
Enter fullscreen mode Exit fullscreen mode

Now just visit your */sms API to send the SMS!

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay