Xbox Music for You (i.e. Dev's)
- Posted: Jul 16, 2014 at 6:00AM
- 9,451 views
- 3 comments
Loading user information from Channel 9
Something went wrong getting user information from Channel 9
Loading user information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Since we last highlighted this project in December 2013, Xbox Music API, it's been pretty quite. Until now.
The week before last the Xbox Music team jump started the Xbox Music API with a number of new features, capabilities and samples.
Welcome to the new Xbox Music for developers blog. We'll use this forum to share news about Xbox Music development as well as engaging in technical tutorials.
With that, we're very happy to announce Xbox Music API availability for third party developers (didn't see that coming, did you!?) Building upon our internal service stack and clients on Windows 8.1, Xbox One, Windows Phone, the Web, Android and iOS, we’re inviting developers to dream up ways to make your apps and experiences cool and exciting by opening up our service REST APIs to the world. We made it dead simple for anyone to innovate, demo and build great integration around Xbox Music. So what are you waiting for?
Ahh, you probably want some details. Well let's go!
The API is a set of easy to use REST methods, including CORS, JSONP and Flash cross domain support. The complete documentation is available here.
Music is first and foremost about content. We've opened access to our 38 million track catalog in 23 countries. We let you search our catalog for artists, albums and tracks. Once you've found what you're interested in, you can lookup extra information for that piece of content, such as an artist's albums. Want to make content more appealing in your application? We also give you access to an extensive set of artist and album images. We also provide deep-links into existing Xbox Music applications on most of our platforms.
Taking it a step further, you get access to user authenticated features of Xbox Music. User authenticated features will at first be restricted to members of our pilot program. Read the subscriber's music library and playlists, add new music content or create new playlists. Curating content to fit a user's taste is complex. With access to a user's personal collection, you can tailor your experience to better meet his needs in your experience. Everything you do to the user's collection and playlists will roam seamlessly to Xbox Music first party apps as well as other third party apps like your own.
I'm sure the question you're all burning to ask is how to get access to actual music in your own applications. The good news is that we're providing full access to 30 second MP3 previews for our entire catalog. They're served as HTTP progressive downloads, making it simple for you to use them. If you want to push integration further, we allow access to full track streaming for Xbox Music Pass subscribers.
You no doubt know that authentication is often a tricky bit when integrating with third party services. We're providing simple to use single sign-in integration with Microsoft Account for user authenticated scenarios. For other features, you only need to sign-up to the Xbox Music offer on Azure Data Market to get an access key.
Since we started opening up the API, multiple tutorials and open source clients have been published by the developer community we've seen great responses from the developer community. We want to make it very easy for you to start experimenting and integrating with Xbox Music. Check-out our new Xbox Music for developers GitHub account page for a sample portable .Net SDK.
What's nice is that now a Music Client example from the team is available...
http://music.xbox.com/developer Bring music to your app. Unlock a new dimension in sound using the power of Xbox Music.
Reference documentation for the Xbox Music Service is available on MSDN: http://go.microsoft.com/?linkid=9840933 .
This solution provides a portable C# client to interface with Microsoft's Xbox Music Service. It targets the following minimum platforms:
- .NET Framework 4.5
- Windows Store apps (Windows 8)
- Windows Phone 8
- Silverlight 5
API features include:
- Catalog search, lookup and browsing
- New releases and tops
- Preview streaming
- Public playlist lookup
- Images and deep-links
Other API features limited by the terms of the http://music.xbox.com/developer/pilot program are:
- Full track streaming for Xbox Music Pass subscribers
- Collection and playlist browsing and editing
And the community, in the case, Jason Roberts, has already stepped up and provide another getting started post,
The Xbox Music API can be used by third party developers (i.e. you and me) to search for artists, songs, albums, etc and also get access to actually play songs.
There are two flavours at present: “unauthenticated” and “authenticated”.
Authenticated access allow playing of full songs and working with user playlists. Playlist changes will automatically roam to user’s other devices. The full access to play full songs requires that the user has an Xbox Music Pass.
Unauthenticated access doesn’t allow access to user playlists, and streaming of music is restrict to 30 second previews.
At present anyone can get unauthenticated access via the Xbox Music RESTful API on Azure Marketplace. Authenticated access is currently limited, you need to apply for the pilot program. I’ve applied for this, hopefully I’ll be accepted so I can understand this part better.
Getting Started with Unauthenticated Access
We need an access key to allow our apps to able to use the (unauthenticated) API. To do this follow these instructions to register and create an application in Azure Marketplace. Don’t worry about the code samples at the bottom of the post, there’s a client API we can use instead.
So now you should have an application registered (you might have to enter some web address in the redirect URI – I’m not sure what this is for at this point).
So here’s a (redacted) screenshot of a registered application:
It only took me an hour or two to figure all this out and create a universal windows app that allows searching of artists, album selection and album art, track selection and then playing (the 30 second unauthenticated) sample in both a Windows 8.1 Store app and a Windows Phone 8.1 app as the following screenshot shows. I’m really excited to find out more about the authenticated access as I already have some cool app ideas to use with Xbox Music integration :)
Let the music begin!