Beats Music believes in being as open as possible, because we think the best ideas come from you. This is why we've decided to open up nearly all of our REST resources, which we use ourselves, to everyone. So GO BIG: we're here to help!
Beats Music is curated by real people who believe music is emotion and life! Beyond that though, Beats Music also provides support for dynamically creating playlists (The Sentence), providing recommendations to your users based on the artists they like (Just for You), editorial content provided to everyone (Highlights), and many great ways to search and select the content people want.
You can use Beats Music APIs in many ways. We will help you get started quickly by showing you how to write code that:
Once you get started with these applications, you can begin to use all of our APIs in your creative development efforts. Please note that all applications must adhere to the Beats Music Brand Guidelines and Terms of Service.
Working with Beats Music APIs
Beats Music APIs are categorized into objects (albums, artists, tracks, playlists, etc.) These objects in most cases may be requested as a "Collection" (all or many) or as a "Lookup" (one specific) by ID.
For example, /v1/api/genres will return all Beats Music genres, whereas /v1/api/genres/:id will return one specific genre specified by :id.
Setting up for Application Development
1. Register your application.
First you'll want to register an application. The application settings include information that will be displayed to your users, as well as technical parameters needed for authentication. You can edit these details in the application settings at any time. To create and register your application, visit My Applications.
2. Get an access token.
Before your application can securely access private data using a Beats Music API, it must obtain an access token that allows you to call that API. A single access token can grant varying degrees of access to multiple APIs. You can try this out in the Playground to see how it works before directly invoking the REST API in your application (see Authentication). Note that the access token you retrieve in the Playground will only work there. If you want to use an access token in your application, you must retrieve it directly through the API. Your API keys carry many privileges so be sure to keep them secret!
3. Use the API.
The base URL for API endpoints is:
There are two ways to authenticate with Beats Music APIs.
If a Beats Music API is publicly available, you only need to provide your client ID in your API requests:
If you are a developer or partner using a Beats Music API on behalf of a user, submit the access token in an HTTP authorization header in an HTTPS request (calls made over plain HTTP will fail). The Beats Music API uses the OAuth 2.0 protocol for authentication and authorization for web server and client-side applications. See Authentication for examples and details.
4. Refresh the token, if necessary.
Access tokens have limited lifetimes. If your application needs access to a Beats Music API beyond the lifetime of a single access token, obtain a refresh token. A refresh token allows your application to obtain new access tokens. Note: Save refresh tokens in secure long-term storage and continue to use them as long as they remain valid.
You can use Beats Music APIs in many ways, and can experiment with the Beats Music APIs by using the Playground, a tool that lets you learn and test our APIs with just a few clicks. Visit the Tutorials, where we will help you get started quickly by showing you how to:
- Getting Started
- Web Playback Library