0

I am trying to build an app that is loosely based on the code given in this link: https://www.twilio.com/help/faq/sms/how-do-i-build-a-sms-keyword-response-application My question is how can I make it so it sends MMS messages back to the sender instead of SMS? I want to be able to send .gifs and .jpegs from a URL link, but without having to actually go to the link. I'm writing it all in php if that also helps.

I've found a lot of resources about SMS, but the material for MMS seems sparse. Any help is appreciated.

  • "the material for MMS seems sparse" - so does your question, to me. Is it that you can't find any documentation on the APIs for sending MMS? Or have you found some functions but don't know which one is needed for a particular task? Or have you got as far as sending an MMS rather than SMS, but don't know how to, for instance, attach an image to it? – IMSoP Apr 05 '14 at 17:52
  • I'm sorry I've been vague. What I meant was there is no helpful material for the situation I'm in, which is, basically, I want to pretty much do exactly what the example is doing except when I receive a text, it will send a .gif or .jpeg URL as an MMS back to the sender. Honestly, I just started fiddling with Twilio yesterday, and understand most of the SMS side of things, btu the documentation for MMS is harder to understand. All I'm asking is how to do the example, but with an MMS, not SMS. Thank you for your comment. – CaptainProdigy Apr 05 '14 at 18:19
  • Well, I don't know Twilio at all, but I just had a quick look through the docs. It seems like the example you post is constructing a "TwiML" response; the `` "verb" has apparently been superceded by [a `` verb which also supports MMS](https://www.twilio.com/docs/api/twiml/sms/message). It looks like the PHP library lets you use each node you want to add like a function call, so I would guess at something like `$msg = $response->message(); $msg->body('hello'); $msg->media($my_url);` – IMSoP Apr 05 '14 at 19:14

1 Answers1

0

Twilio evangelist here.

I'd start by checking out the Sending Messages docs in our REST API documentation. The new Message endpoint is a single resource in our API lets you send either SMS or MMS without you really having to care which it is. If you have media attached, we will send an MMS, otherwise and SMS.

Specifically, this example shows you using the PHP helper library how to send a Message that includes both a text body and an image.

Hope that helps.

Devin Rader
  • 10,260
  • 1
  • 20
  • 32