import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const media = await client.media.retrieve('media_name');
console.log(media.data);{
"data": {
"media_name": "f5586561-8ff0-4291-a0ac-84fe544797bd",
"expires_at": "2020-01-23T18:10:02.574Z",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"content_type": "application/xml"
}
}Returns the information about a stored media file.
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: 'My API Key',
});
const media = await client.media.retrieve('media_name');
console.log(media.data);{
"data": {
"media_name": "f5586561-8ff0-4291-a0ac-84fe544797bd",
"expires_at": "2020-01-23T18:10:02.574Z",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"content_type": "application/xml"
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Uniquely identifies a media resource.
A response describing a media resource
Show child attributes
Uniquely identifies a media resource.
ISO 8601 formatted date of when the media resource will expire and be deleted.
"2020-01-23T18:10:02.574Z"
ISO 8601 formatted date of when the media resource was created
"2019-01-23T18:10:02.574Z"
ISO 8601 formatted date of when the media resource was last updated
"2019-01-23T18:10:02.574Z"
Content type of the file
"application/xml"
{
"media_name": "f5586561-8ff0-4291-a0ac-84fe544797bd",
"expires_at": "2020-01-23T18:10:02.574Z",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z",
"content_type": "application/xml"
}Was this page helpful?