Lists the media files sent or received with an MMS message.
GET
https://api.plivo.com/v1/Account/{auth_id}/Message/{message_uuid}/Media/
This API call returns the list of media files associated with the MMS message identified by the message_uuid
specified in the request URL.
HTTP Status Code: 200
{
"api_id": "035eeada-6df1-11e6-b608-06a72a185e87",
"objects": [
{
"content_type": "application/pdf",
"media_id": "0178eb8a-461a-4fd1-bc37-13eebfdc0676",
"media_url": "https://media.plivo.com/Account/{auth_id}/Message/24d742b9-9b12-4397-93a7-da496bc874d9/Media/0178eb8a-461a-4fd1-bc37-13eebfdc0676",
"message_uuid": "24d742b9-9b12-4397-93a7-da496bc874d9",
"size": 433994
}
]
}
1
2
3
4
5
6
import plivo
client = plivo.RestClient('<auth_id>','<auth_token>')
response = client.messages.get(message_uuid="your_message_uuid").listMedia()
print str(response)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'rubygems'
require 'plivo'
include Plivo
include Plivo::Exceptions
api = RestClient.new("<auth_id>","<auth_token>")
begin
response = api.messages.get('your_message_uuid').listMedia()
puts response
rescue PlivoRESTError => e
puts 'Exception: ' + e.message
End
1
2
3
4
5
6
7
8
9
10
11
12
13
let plivo = require('plivo');
let client = new plivo.Client('auth_id', 'auth_token');
let optionalParams = {};
client.messages.get("your_message_uuid").then(function (message) {
return client.messages.listMedia(message.messageUuid)
})
.then(function (result) {
console.log("\n============ list Media ===========\n", result)
})
.catch(function (response) {
console.log("\n============ Error :: ===========\n", response);
});
1
2
3
4
5
6
7
8
9
10
<?php
require 'vendor/autoload.php';
use Plivo\RestClient;
$client = new RestClient("<auth_id>","<auth_token>");
$response = $client->messages->get('your_message_uuid')->listMedia();
print_r($response);
?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import java.io.IOException;
import java.net.URL;
import java.util.Collections;
import com.plivo.api.Plivo;
import com.plivo.api.exceptions.PlivoRestException;
import com.plivo.api.models.message.MmsMedia;
public class Test {
public static void main(String[] args) {
Plivo.init("<auth_id>", "<auth_token>");
try {
ListResponse<MmsMedia> response = MmsMedia.listMedia("<message_uuid>").list();
System.out.println(response);
}
catch (PlivoRestException | IOException e) {
e.printStackTrace();
}
}
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
using System;
using System.Collections.Generic;
using Plivo;
namespace PlivoExamples
{
internal class Program
{
public static void Main(string[] args)
{
var api = new PlivoApi("<auth_id>","<auth_token>");
var response = api.Message.Get("your_message_uuid").ListMedia();
Console.WriteLine(response);
}
}
}
1
2
curl -i --user auth_id:auth_token \
https://api.plivo.com/v1/Account/{auth_id}/Message/{message_uuid}/Media/
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package main
import (
"fmt"
"github.com/plivo/plivo-go/v7"
)
func main() {
client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
if err != nil {
fmt.Print("Error", err.Error())
return
}
response, err := client.Messages.ListMedia("your_message_uuid")
if err != nil {
fmt.Print("Error", err.Error())
return
}
fmt.Printf("Response: %#v\n", response)
}