How do I retrieve image files from MMS messages?

When Plivo receives an MMS message on your Plivo number, it sends an HTTP request to the message request URL you have configured for that number. In addition to the standard SMS parameters, the request includes the "Type" and "Media" parameters. Since an MMS message can contain up to 10 images, the "Media" parameters are labeled sequentially as "Media0," "Media1," "Media2," and so on.

To retrieve the image files:

  1. Parse the HTTP Request: Extract the "Media" parameters from the incoming HTTP request.
  2. Access the Image URLs: Each "Media" parameter contains a URL pointing to the respective image file.
  3. Download the Images: Use the provided URLs to download and process the images as needed.

Example: If an MMS contains three images, the HTTP request will include parameters named "Media0," "Media1," and "Media2," each containing the URL to an image file.

This structure allows you to handle multiple images efficiently within a single MMS message.

Was this article helpful?
0 out of 0 found this helpful
Didn’t find what you are looking for? Create new ticket