API 2.0 Version 1.0
Playing Music

The API can be used to play music that is hosted by InstantEncore on your website or other services. You have the option of opening InstantEncore's music player from your own website or you can use build your own player using direct urls to the MP3 files.

Option 1: Opening the InstantEncore Music Player

The following code will create an image that can be clicked by a user to open the music player. You will need to set the ITEMID, API_KEY, IMAGE_URL and ALT_TEXT parameters. It is recommended to maintain the default properties for the window (width, height, etc) so that the music player is sized properly.

The itemid identifies the album, work or track to be played and can be found using the Albums.List or Albums.Details methods.

<a style="cursor:pointer;" onclick="window.open('https://instantencore.com/music/player.aspx?playitemid=ITEMID&api-key=API_KEY', 'iemusicplayer', 'toolbar=0, scrollbars=1, location=0, statusbar=0, menubar=0, resizable=0, width=315, height=620, left=100, top=100');" ><img src="IMAGE_URL" alt="ALT_TEXT" /></a>
ITEMID The itemid of the album, work or track to play.
IMAGE_URL URL of the image that you want to display. When the user clicks the image the player will open.
ALT_TEXT Alternate text to be displayed if the image doesn't appear

You may customize the color and logo on the music player in the Control Panel. This allows the player to have the look and feel of your website.

Option 2: Direct urls to the MP3 files

To directly access the MP3 files use the Albums.AudioFile API method. Depending on the redirect parameter this method can either return a url to the file or it will automatically redirect to the file.

Streaming Stats

InstantEncore provides stats about the number of times each track is streamed. Please note that the streams are only tracked when music is played using the InstantEncore music player. If you use direct urls to play music through your own music player interface then the streams will not be included in the stats.