Search code examples
twiliotwilio-apimmstwilio-node

How can I send a MMS with original mediaUrl from twilio?


I am sending MMS through twilio rest api. I received message on phone but media preview is not visible.

Here is code: enter image description here

MMS Preview:

enter image description here

I think twilio convert mediaUrl to tiny link that's why its preview not available. when I click on twilio link media visible on web.

looking for help.

thank you


Solution

  • With Twilio you can only send MMS messages to numbers in the US and Canada. If you try to send an MMS to a number outside of those countries then Twilio will will convert the message to an SMS message with a URL link to the media, as in this case. You can read more about how this works in this article about the MMS Converter.

    To see the media in the message, you need to ensure you are sending MMS messages to numbers in the US and Canada.

    Previews can be shown from links, but it appears that is not working with the media in this case, possibly because the response is a redirect to the file in an S3 bucket. If you want to send images to phone numbers outside of the US and Canada I would recommend you send it as your own URL in the body of the message and ensure that the URL links directly to the image so that the SMS application can read it and preview it easily.