Retrieve a Fax Media Instance
Use this endpoint for the Fax Media method to retrieve a single fax media.
Parameters
Parameter | Description |
---|---|
MediaSid Required | The SID that uniquely identifies the fax media to retrieve. |
Request
- cURL
- Node.js
- C#
- Python
- Ruby
curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/Faxes/{FaxSid}/Media/{MediaSid}.json \
-X GET \
-u "YourProjectID:YourAuthToken"
const { RestClient } = require('@signalwire/compatibility-api')
const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
client.fax.faxes('FaxSid')
.media('MediaSid')
.fetch()
.then(media => console.log(media.contentType))
.done();
using System;
using System.Collections.Generic;
using Twilio;
using Twilio.Rest.Fax.V1.Fax;
class Program
{
static void Main(string[] args)
{
TwilioClient.Init("YourProjectID", "YourAuthToken", new Dictionary<string, object> { ["signalwireSpaceUrl"] = "{SPACE}.signalwire.com" });
var media = FaxMediaResource.Fetch(
pathFaxSid: "FaxSid",
pathSid: "MediaSid"
);
Console.WriteLine(media.ContentType);
}
}
from signalwire.rest import Client as signalwire_client
client = signalwire_client("YourProjectID", "YourAuthToken", signalwire_space_url = 'example.signalwire.com')
media = client.faxes('FaxSid') \
.media('MediaSid') \
.fetch()
print(media.content_type)
require 'signalwire/sdk'
@client = Signalwire::REST::Client.new 'YourProjectID', 'YourAuthToken', signalwire_space_url: "example.signalwire.com"
media = @client.faxes('FaxSid')
.media('MediaSid')
.fetch
puts media.content_type
Responses
200 OK
{
"account_sid": "b3877c40-da60-4998-90ad-b792e98472ac",
"content_type": "application/pdf",
"date_created": "2018-11-27T20:00:00Z",
"date_updated": "2018-11-28T20:00:00Z",
"fax_sid": "b3877c40-da60-4998-90ad-b792e98472fs",
"sid": "b3877c40-da60-4998-90ad-b792e98472fx",
"url": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472ac/Faxes/b3877c40-da60-4998-90ad-b792e98472fs/Media/b3877c40-da60-4998-90ad-b792e98472fx"
}