JerryW
September 11, 2022, 11:53pm
1
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);
}
}
hugo
September 30, 2022, 9:43pm
2
There is a recently submitted change on the repo which I believe addresses this, but it’s not released yet. @smittytone might be able to help?
Yeah, that’s ready to go, but I can’t make it available via #require
statements. @zandr ? @ahoughton ?
Meantime, @JerryW you can paste in the 2.0.0 code from the repo in place of the #require
.
JerryW
October 3, 2022, 2:22pm
4
Thank you for the replies. Thank you for the revised code.
We’ll get the new library up and available via “#require ” soon.
zandr
October 3, 2022, 10:07pm
6
The updated library has been published. The file name has changed, so you’ll need to update the require statement to #require "Twilio.agent.lib.nut:2.0.0"
system
Closed
November 11, 2022, 12:54am
7
This topic was automatically closed after 60 days. New replies are no longer allowed.