You'll almost invariably want to serve up preview clips of music to your users. Rhymba makes serving previews very straightforward.
To serve a preview, you'll need the base content URL, our media ID for the song, and your access token. It takes the form of the following:
Let's walk through each component of the preview URL.
https://dispatch.mcnemanager.com/preview/ is the base URL to our content server. You can use either HTTP or HTTPS depending on your implementation.
Next, you specify our media ID. This is a track-level ID, not an album or artist ID.
The preview server allows you to specify a custom filename for the MP3 returned as a part of the URL, ANY-FILENAME-YOU-WANT.mp3. Most people opt for something simple like preview.mp3 or media-id.mp3, but you can always do this on a custom per-request basis if you'd like.
Finally, the last required parameter is your access_token. We're required by the labels to enforce access rules for preview clips, so your access token helps the system determine whether you're allowed to retrieve this particular preview.
Next up are some optional parameters that are helpful for your reporting purposes. suid and luid can be any values. suid is the stream user ID, and luid is the listener user ID that's getting the preview. Think of these parameters as reference IDs on invoices; they mean nothing to us, but can be used by you to aggregate information about preview usage on a per-user basis, like if you wanted to see the ratio of average number of previews hit by a user vs. the amount of purchases or streams they engage in.
Dynamic Previews, Tigers, and Bears, Oh My!
If the labels provided us with a pre-cut preview for the content you're requesting, that's what we'll serve you. If we don't already have a preview, however, the content server will intelligently serve only a 30-second portion's worth of data of the song you specify, and, then on the backend, an encoding request will be put in to generate an MP3 cut. So bear in mind that provided & pre-cut or encoder-cut previews will be at a bitrate around 128kbps, but if the content server does dynamic cut serving your preview will be in the original file's bitrate — which can top off at 320kbps.