close
The Wayback Machine - https://web.archive.org/web/20140813151023/https://developer.beatsmusic.com/docs/read/tutorials/Play_a_Track

Play a Track

Once you have searched the Beats Music Catalog and found some tracks, you can extract one of the track IDs in the results and submit it to the Audio API in order to play that track. This API requires an access token since you will invoke it on behalf of a user.

The general form of this API is:

curl -X GET 
"https://partner.api.beatsmusic.com/v1/api/tracks/
[TRACK_ID]/
audio?
&access_token=[YOUR_ACCESS_TOKEN]"

In this example we will use one of the search results we obtained and play "Blood on the Tracks" by Michael Gray, which has track ID tr51760477:

curl -X GET 
"https://partner.api.beatsmusic.com/v1/api/tracks/
tr51760477/
&access_token=bdusn2fc4ume8ftumrfdydbe"

Here is the response indicating that you have successfully played the track:

{
    "data": {
        "location": "rtmp://edgecast-fmstream.mndigital.com",
        "resource": "mp3:/mp3/mn_mp3_10_10/downloads/a070/051/760/017?48da",
        "codec": "MP3",
        "bitrate": 320,
        "type": "audio_asset",
        "refs": {
            "track": {
                "ref_type": "track",
                "id": "tr51760477",
                "display": "Blood On The Tracks"
            }
        }
    },
    "code": "OK"
}

Docs Navigation