What I'm trying to do is take something I'm doing through an execute command in switch and convert it to a switch script. I keep getting a parse error and I'm not sure why... Script works fine when I execute it in node, but fails in the switch scripter...? Any help would be great!
Code: Select all
const accountSid = 'AC?????????????'; // Your Account SID from www.twilio.com/console
const authToken = 'b4???????????????'; // Your Auth Token from www.twilio.com/console
const client = require('twilio')(accountSid, authToken);
client.messages.create({
body: "Say something",
to: '+12222222222',
from: '+13333333333',
})
.then((message) => console.log(message.sid));