Search code examples
c#asp.net-mvcsmstwilio-apimms

How to differentiate between MMS and SMS via any Message property given in Twilio


Would it is possible to identify that the Incoming and Outgoing message is SMS or MMS.

Messaging price


Solution

  • Twilio developer evangelist here.

    An inbound MMS will have a request parameter NumMedia with a non-zero value, if the inbound message is just an SMS then it will have NumMedia=0.

    For outbound messages, you will know whether they are MMS messages because you either create the message with the REST API and provide one or more MediaUrls or you respond to an incoming message with a <Media> element.

    If you are inspecting the messages later, using the REST API, message resources have a NumMedia property that will be non-zero if it is a media message.