0

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.

Sal
  • 1,471
  • 2
  • 15
  • 36

1 Answers1

0

Twilio developer evangelist here.

You might be experiencing carrier filtering. In this case, this is not something we can fix on Stack Overflow.

You should get in touch with Twilio support and provide them with example message SIDs for messages that didn't arrive. They will be able to check in to see what happened and make suggestions to avoid this.

philnash
  • 70,667
  • 10
  • 60
  • 88