🎶 Setting up Spotify OAuth for DABHounds
DABHounds can pull tracks from Spotify and convert them into DAB playlists. However, Spotify requires OAuth client credentials for anything that touches user data, including private and collaborative playlists.
Many developers initially try to ship a shared client ID/secret or use a test app. Spotify’s policies make this tricky: test apps are designed for private use and limited users only, and if they detect abuse or public distribution, the credentials can be revoked repeatedly. DABHounds experienced exactly this — apps in developer/test mode kept getting disabled.
This guide explains how users can create their own Spotify app, add themselves as authorized testers, and avoid repeated bans while understanding the limits of public vs. private access.
🔓 What works without credentials?
- Public tracks, albums, and public playlists that are globally visible often work with the client credentials flow.
- Metadata for individual tracks or albums can be fetched without OAuth.
This is enough for quick tests or basic conversions.
đź”’ What requires OAuth?
- Private playlists
- Collaborative playlists
- Anythng tied to your personal account data
⚠️ Important limitation: Even with OAuth using your own app, Spotify-generated libraries such as editorial playlists, algorithmic mixes (e.g., Discover Weekly, Release Radar), or other system-generated collections are not accessible via the API. You will get a 404 or empty results if you try to fetch these. Only playlists created by a user or collaborative playlists can be accessed.
If you try to fetch these without OAuth, Spotify will usually return a 404 “Resource not found”, even though the playlist exists.
🛠️ How to create your own Spotify app
- Go to the Spotify Developer Dashboard and log in with your Spotify account.
- Click “Create an App.”
- Give it a name like
DABHoundsorMy Playlist Converter. - Enter a simple description (e.g., “Personal use tool for playlist conversion”).
- Give it a name like
- Set a Redirect URI for OAuth authentication:
http://127.0.0.1:8888/callback. - Save changes.
- Copy your Client ID and Client Secret.
⚠️ Test Mode Limitations
Spotify apps are initially in developer/test mode:
- They can only be used by users you explicitly add as testers.
- The app cannot be publicly distributed or published without going through Spotify’s review process.
- To add a tester:
- Open your app in the Spotify Developer Dashboard.
- Click “User Management”.
- Enter a Name (Biggus Dickus) and email of the user (yourself) who need access.
- Click on "Add User".
⚙️ Adding credentials to DABHounds
- After finishing all of this, you can run DABHounds’ interactive login command, an example run is given below:
On the next run, DABHounds will prompt you to log in to Spotify once. Your access and refresh tokens will be stored locally, so you won’t need to repeat the login unless you log out or delete your config.
âť“ FAQ
Q: Do I need a paid Spotify account?
No. Free accounts can generate OAuth tokens and fetch playlists.
Q: Will Spotify ban me for using this?
Probably not.
Q: Why can’t DABHounds ship credentials?
Because test-mode apps are limited to a small set of testers. Publicly sharing credentials triggers Spotify to revoke them repeatedly, which is exactly what happened in prior DABHounds builds.
âś… Summary
- Without OAuth: fetch basic track/album metadata and some public playlists.
- With OAuth (personal app in test mode): access private playlists, collaborative playlists, and editorial mixes.
- Steps for setup: create a Spotify app, add yourself as a tester, enter credentials after running
dabhounds --spotify-login, then log in.
Following these steps ensures stable access.