Authentication
The Epidemic Sound API supports three authentication methods. API Key Authentication is recommended for all new integrations.
Quick Comparison
| API Key | Connect (OAuth) | Partner Token (Legacy) | |
|---|---|---|---|
| Status | Recommended — use for new integrations | Active | Legacy — migrate when possible |
| ES account required? | No | Yes — users must log in with their Epidemic Sound credentials | No |
| Token management | Single long-lived API key (backend only) | OAuth access/refresh tokens (client) | Partner Token (backend only) + User Token (client-side, used directly against ES servers) |
| Best for | All server-side integrations | Apps where users have ES subscriptions | Existing integrations not yet migrated |
| Content access | Curated collections or full catalogue | Full library + personalized content | Curated collections or full catalogue |
- Use API Key Authentication if you're starting a new integration, or migrating an existing one. It's simpler and has full parity with Partner Token + User Token combined.
- Use Partner Token Authentication if you have an existing integration and haven't migrated yet. See the migration guide below.
- Use Connect Authentication if your users are existing Epidemic Sound subscribers who want to access their personal library and liked tracks.
Content Access
Your content access level applies to API Key and Partner Token Authentication and is negotiated as part of your partnership agreement (curated collections or full catalogue). With Connect Authentication, users get access to the full library plus their personalized content.
For detailed information on content access levels and managing collections, see the Fundamentals.
API Key Authentication
API Key Authentication is the recommended authentication method for server-side integrations. A single long-lived API key goes directly in every request — no token exchange or credential handshake required.
How it works
Your API key goes directly in the Authorization header of every request:
Authorization: Bearer your-api-key
No token exchange, no separate credential handshake. Unlike Partner Token Authentication — where the User Token was designed to be passed to the client for direct calls — the API key stays on your server and all requests are proxied through your own backend.
Step 1: Get your API key
API keys are provisioned through the Epidemic Sound Developer Portal. If you don't have access yet, see the Getting Started Prerequisites section.
Once you have portal access, your API key can be found under Authentication settings → API keys. Keys are prefixed with epidemic_live_.
Step 2: Make authenticated requests
Add your API key as a bearer token in the Authorization header of every request:
curl -X 'GET' 'https://api.epidemicsound.com/v0/tracks' \
-H 'accept: application/json' \
-H 'Authorization: Bearer your-api-key'
Step 3: Identify your users
All requests made with an API key share the same credential. To attribute individual requests to your end users, pass a stable user identifier in the x-partner-user-id header. This is not required for the request to succeed, but without it Epidemic Sound cannot attribute activity per user for analytics and rate limiting purposes.
curl -X 'GET' 'https://api.epidemicsound.com/v0/tracks/search?term=upbeat' \
-H 'Authorization: Bearer your-api-key' \
-H 'x-partner-user-id: user-abc-123'
Use a stable, anonymised identifier for your end user — not their name or email address. The value must be safe to share with third parties.
Endpoint access
API Key Authentication has full endpoint parity with Partner Token and User Token authentication combined. Every endpoint previously accessible with either of those token types is accessible with an API key. Your content access level (curated collections or full catalogue) is still determined by your partnership agreement.
| Endpoint Category | API Key | Partner Token | User Token |
|---|---|---|---|
| Browse & Search | ✓ | ✗ | ✓ |
| Preview & Download | ✓ | ✗ | ✓ |
| Audio Upload | ✓ | ✓ | ✗ |
| Get Audio by Checksum | ✓ | ✓ | ✓ |
Usage Reporting (/v0/usage) | ✓ | ✗ | ✓ |
| Bulk Reporting | ✓ | ✓ | ✗ |
The one thing an API key cannot do is generate a User Token — but with API Key Authentication, there is no need for one.
Reporting usage
Use POST /v0/analytics/report to report when your users preview, download, or export tracks. Include an explicit userId in each event so activity is correctly attributed per user.
curl -X 'POST' 'https://api.epidemicsound.com/v0/analytics/report' \
-H 'Authorization: Bearer your-api-key' \
-H 'Content-Type: application/json' \
-d '{
"events": [
{
"userId": "user-abc",
"timestamp": "2026-03-30T10:00:00Z",
"userConnected": false,
"analyticsEvent": {
"trackId": "some-track-id",
"type": "trackPreviewed"
}
},
{
"userId": "user-xyz",
"timestamp": "2026-03-30T10:01:00Z",
"userConnected": false,
"analyticsEvent": {
"trackId": "some-track-id",
"format": "mp3",
"quality": "normal",
"type": "trackDownloaded"
}
}
]
}'
Migration Guide
This section is for integrations currently using Partner Token Authentication who are switching to API Key Authentication.
What changed
The old flow required two separate API calls before you could make any content request:
- Exchange
accessKeyId+accessKeySecretfor a Partner Token (TTL: 1 day) - Exchange the Partner Token + a
userIdfor a User Token (TTL: 7 days) - Use the User Token for all other API calls
API Key Authentication replaces this entire flow with a single credential used directly. It has full parity with both token types — you do not lose access to any endpoint by switching.
Request routing
With Partner Token Authentication, the User Token was safe to pass to the client — your frontend could call the Epidemic Sound API directly without a proxy. With API Key Authentication, the key stays on your server, so if your current integration makes direct API calls from the client, you will need to proxy those requests through your own backend as part of this migration.
Reporting usage
POST /v0/usage works with API key authentication, so you do not need to migrate to a different endpoint. The difference is that with a User Token the user was identified implicitly by the token itself; with an API key there is no per-user token, so pass x-partner-user-id on the request to preserve per-user attribution.
POST /v0/analytics/report is also available for batch event reporting (up to 100 events per request, with explicit userId per event). See Reporting usage above.