Twilio SMS Messaging Service

Lately, I have been getting messages about Twilio shutting down their old SMS service and I need to switch my code to use the Messaging Service by November of this year. Can someone help me modify my agent code to fix this?

function SendSMS(smsMsg) {
twilioSID ← “TWILIO SID”;
twilioToken ← “TWILIO TOKEN”;
twilioNumber ← “MY TWILIO NUMBER”;

twilio <- Twilio(twilioSID, twilioToken, twilioNumber);

recipientsNumber <- ["MY NUMBER"];
textMessage <- "Your mailbox has been " + smsMsg;

// Send the message synchronously
foreach (number in recipientsNumber) {
    local response = twilio.send(number, textMessage);
    server.log(response.statuscode + ": " + response.body);