Skip to main content

Getting Started

With the Epidemic Sound Partner API, you can offer your users the perfect soundtrack for their content. This guide will walk you through the steps to authorize your app, fetch available collections with their tracks, and download a track.

Prerequisites

To use the Epidemic Sound Partner API, you need access to the Epidemic Sound Developer Portal. If you don't have access yet, please reach out to us to discuss a partnership. Once your partnership agreement is in place, your technical team members will be added to the portal and will receive an email with instructions on how to obtain your API credentials.

Workflow steps

  1. Authorize your app
  2. List collections with their tracks
  3. Download a track

Authorize your app

All calls to the Epidemic Sound Partner API require an access token. The API supports two authentication methods, each providing a different type of access token:

Partner Token Authentication (covered in this guide)

  • For services where users don't have Epidemic Sound accounts
  • Provides access to your negotiated content (curated collections or full catalog)
  • Two-step flow: Partner Token → User Token
  • See the Partner Token Authentication documentation for details

Connect Authentication (OAuth 2.0)

  • For services where users are Epidemic Sound subscribers
  • Requires users to log in with their Epidemic Sound credentials
  • Provides access to the full library plus personalized content (liked tracks, playlists)
  • See the Connect Authentication documentation for details

This guide focuses on Partner Token Authentication. For a comprehensive overview of both methods and when to use each, see the Authentication documentation.

Partner Token Authentication

Partner Token Authentication is a two-step process:

  1. Get a Partner Token using your API credentials (store on your backend only)
  2. Get a User Token for each end user (can be stored on the client side)

Once you have a User Token, your frontend/mobile app can call Epidemic Sound APIs directly.

You'll need API credentials (accessKeyId and accessKeySecret) from the Developer Portal (see Prerequisites above). For details on obtaining these credentials, see the Authentication guide.

Security

Never expose your accessKeyId or accessKeySecret in client-side code. These should only be used on your backend to generate Partner Tokens.

Step 1: Get a Partner Token

First, generate a Partner Token using your API credentials. This should be done on your backend server.

Fetching a Partner Token
curl -X 'POST' \
'https://partner-content-api.epidemicsound.com/v0/partner-token' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"accessKeyId": "{access_key_id}",
"accessKeySecret": "{access_key_secret}"
}'
Example Partner Token response
{
"accessToken": "eyJ0eXAi…"
}

The Partner Token has a TTL of 1 day and should be stored securely on your backend.

Step 2: Get a User Token

Use the Partner Token to fetch a User Token for each end user. You must provide a unique userId for analytics and security purposes. You can use any string as long as it stays unique per user.

Fetching a User Token
curl -X 'POST' \
'https://partner-content-api.epidemicsound.com/v0/token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {Partner Token}' \
-d '{
"userId": "d6bbf89b-56da-49c5-b3f1-252f61a34970"
}'
Example User Token response
{
"accessToken": "xjOx…"
}

The User Token has a TTL of 7 days. This token can be stored on the client side and used directly to make API requests from your frontend or mobile app.

List collections with their tracks

The collections and tracks available to your app depend on your content access level, which is negotiated as part of your partnership agreement. See the FAQ for details on content access levels. You can manage your collections in the Developer Portal.

Use the collections endpoint to list your collections and the first few tracks of each collection.

Performance Optimization

For better performance, especially with large collections, use excludeFields=tracks to list only collection metadata. You can then fetch tracks for specific collections separately using the collection details endpoint.

Listing collections
curl -X 'GET' \
'https://partner-content-api.epidemicsound.com/v0/collections' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {User Token}'
Example collections response
{
"collections": [
{
"id": "7a84d049-057a-46fb-93d1-eace263d8973",
"name": "Lounge",
"tracks": [
{
"id": "Mj0MGDIRZm",
"title": "Solaris",
"mainArtists": [
"Marc Torch"
],
"featuredArtists": [],
"bpm": 110,
"length": 178,
"moods": [
{
"id": "epic",
"name": "Epic"
},
{
"id": "hopeful",
"name": "Hopeful"
}
],
"genres": [
{
"id": "2010s-rock",
"name": "2010s Rock",
"parent": {
"id": "rock",
"name": "Rock"
}
},
{
"id": "post-rock",
"name": "Post Rock",
"parent": {
"id": "rock",
"name": "Rock"
}
}
],
"images": {
"default": "https://cdn.epidemicsound.com/curation-assets/commercial-release-cover-images/4661/300x300.jpg",
"XS": "https://cdn.epidemicsound.com/curation-assets/commercial-release-cover-images/4661/128x128.jpg",
"S": "https://cdn.epidemicsound.com/curation-assets/commercial-release-cover-images/4661/300x300.jpg",
"M": "https://cdn.epidemicsound.com/curation-assets/commercial-release-cover-images/4661/600x600.jpg",
"L": "https://cdn.epidemicsound.com/curation-assets/commercial-release-cover-images/4661/1050x1050.jpg"
},
"waveformUrl": "https://pdn.epidemicsound.com/waveforms/1600/331261.json",
"isExplicit": false,
"hasVocals": false,
"added": "2020-02-12",
"isPreviewOnly": false,
"tierOption": "FREE"
}
],
"pagination": {
"page": 1,
"limit": 10
},
"links": {
"next": "/v0/collections?limit=10&offset=10",
"prev": null
}
}

Download a track

You are now just one call away from downloading the audio file. Use the trackId from the previous call to get a download link to the actual media file from our CDN.

Download a track
curl -X 'GET' \
'https://partner-content-api.epidemicsound.com/v0/tracks/{Track ID}/download?format=mp3&quality=normal' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer {User Token}'
Example track download response
{
"url": "https://d37sjn4j2x9ce8.cloudfront.net/ES_ITUNES/Solaris/ES_Solaris.mp3?Expires=1666691372&Signature=eUU4M5v…XKQ__&Key-Pair-Id=K344YJTI5162TY",
"expires": "2022-10-25T09:49:32Z"
}

The returned URL link is set to expire. The user has to start the download before the link expires.

Available quality options:

  • normal (128kbps) - Default, sufficient for most use cases
  • high (320kbps) - For content requiring higher audio quality

What's next?

Read more on how you can access collection details and explore all the music available within a collection.