I'm working on an application that can automatically send out texts to members via Twilio. I need to include a URL in the message body, however, while the Twilio logs are showing the message as either 'sent' or 'delivered', I have not received the text on either of my 2 devices (Galaxy s10 and Galaxy s21, both on T-Mobile). The calls to send a message do work when I include a mediaUrl
or a body
without a URL (I've tested multiple messages with and without a URL), however I just haven't received a single message with a URL in the message body.
let twilioConfig = {
body: `RSVP Link: <Some text>`, from: <fromPhoneNumber>, to: <toPhoneNumber>, mediaUrl: mediaLocationUrl
};
twilioClient.messages
.create(twilioConfig)
.then(message => console.log(message.sid)).catch((err) => {
console.log("Ran into error while dispatching text through twilio");
console.log(err);
console.log("\n\n");
});
If my twilioConfig.body
has a URL, an sid
will print to the console, no error will be printed, and the Twilio logs will show as delivered, however neither of my phones actually receive any messages. If I remove the url (and keep literally every other piece of text there), and send the message, I will receive it seconds later, also sometimes showing as 'sent' and sometimes showing as 'delivered' in the logs.