Spotify App Setup
EchoStats requires a Spotify Developer application to access the Spotify Web API.
Steps
- Go to the Spotify Developer Dashboard
- Log in with your Spotify account
- Click Create App
- Fill in the details:
- App name: EchoStats
- App description: Self-hosted Spotify analytics
- Website: Your EchoStats URL (e.g.,
http://localhost:3000) - Redirect URI:
http://localhost:8000/api/v1/auth/callback - Check Web API
- Click Save
- Go to Settings and copy your Client ID and Client Secret
- Add them to your
.envfile:
SPOTIFY_CLIENT_ID=your_client_id_hereSPOTIFY_CLIENT_SECRET=your_client_secret_hereSPOTIFY_REDIRECT_URI=http://localhost:8000/api/v1/auth/callbackImportant Notes
- The Redirect URI must match exactly what’s in your
.envfile - For production, update the redirect URI to use your domain
- You may need to add users under User Management if your app is in development mode
- Spotify Premium is required for some API features
API Scopes Used
EchoStats requests the following Spotify API scopes:
| Scope | Purpose |
|---|---|
user-read-private | Read user profile |
user-read-email | Read user email |
user-top-read | Read top artists and tracks |
user-read-recently-played | Read recently played tracks |
user-library-read | Read saved tracks |
user-read-currently-playing | Read currently playing track |
playlist-read-private | Read private playlists |
playlist-modify-public | Create/edit public playlists |
playlist-modify-private | Create/edit private playlists |