Getting Started
Please refer to the documentation of the latest version.
The Music API is a RESTful service that lets you build your own integration for Stingray Music. With the APIs, you can offer consistent player functionality and continuous access to the Stingray Music catalog.
To get started, you'll need to do the following:
- Get an API key. Your Stingray representative provides you with a unique API key that can be used to access the API. Contact Stingray for more information.
- Build your Music API service backend. For example endpoint requests, refer to the API documentation or the official swagger.
Service Endpoint
The Music API's base endpoint is https://music-service.stingray.com/api/v1
.
Authenticating Your Music API Service
Every Music API queries require a valid Stingray API key.
Parameter | Description | Type |
---|---|---|
X-Client-Id | An X-Client-Id must be included in the header for every call. This key is provided by Stingray, and is unique for each partner. | String |
Cross-Origin Resource Sharing (CORS) is disabled for all endpoints.
Endpoints and Requests
You can access the REST Music API using curl or any other HTTP client. Every request must have the following headers:
- X-Language: ISO 639-1 language code.
- X-Device-Id: Unique identifier of the device making the request.
Example GET Request
The following example request retrieves classical music channel.
Replace {api_key}
with an actual api key.
curl -X 'GET' \
'https://music-service.stingray.com/api/v1/channel?tag_name=CLASSICAL&page_number=0&page_size=20' \
-H 'accept: application/json' \
-H 'X-Language: en' \
-H 'X-Device-Id: XXX-XX-XX-XX' \
-H 'X-Client-Id: {api_key}'
Depending on the agreed lineup for your api key, there might not be any channel returned for the previous example.