API 2.0 Version 1.0
Albums.AudioFile
Returns a url to access an MP3 file.
Example
Arguments
itemid required
Identifies the track of the MP3 file to access. Please note that only itemids of tracks are allowed (not albums or works).
redirect optional
By default this method will return an object with the url of the MP3 file. However, if redirect is 1 then this method will automatically forward to the MP3 file. This can be useful if you have a music player on your website and you want to point it to an MP3 file to play. Becareful doing this because if you embed the url to this method directly in your HTML page you are exposing your API Secret.
Allowed values are:
  • 0 (default) - The url will be returned as a string.
  • 1 - The API will automatically redirect to the MP3 file.
expires optional
For security purposes all MP3 files are protected from direct access. However Albums.AudioFile creates a time-sensitive, temporary url that can access a file. The expires parameter specifies how long this url is valid for. The default is 5 seconds. If you do not connect to the MP3 within this window then you cannot access the MP3. The max allowed value is 86400 seconds (24 hours).
encoding optional
Each audio track is stored at three different bitrates. This argument specifies which version to retrieve.
Allowed values are:
  • 1 (default) - This version is the exact same as the original file that was uploaded.
  • 2 - This version has a bitrate of 128 kbps unless the original file was less than 64 kbps - in which case it is the exact same as the original.
  • 3 - This version has a bitrate of 64 kbps unless the original file was less than 64 kbps - in which case it is the exact same as the original.
Response Elements
Element Description Empty Allowed? Cardinality?
audio-file
Contains the url to the MP3 file.
no 1
Sample Response
<audio-file>
   <url>https://s3.amazonaws.com/streaming.instantencore.com/5005412/5005412-1-1-1.mp3?AWSAccessKeyId=AKIAIFP72T3QSUWHI7PQ&Expires=1713535108&Signature=138XV8hSM5PGkvDQ9KK72iy59rs%3D</url>
</audio-file>