Setup
Get credentials
Go to the Spotify Developer Dashboard and create an app. Under Edit Settings, add your redirect URI:Configure
Environment variables
Scopes
Default scopes:user-read-email, user-read-private
To access additional Spotify data, pass a scopes array:
The
user-read-email scope is required to retrieve the user’s email address. Without it, the identity will fall back to the Spotify user ID.Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /auth/oauth/authorize/spotify | Redirect to Spotify |
| GET | /auth/oauth/callback/spotify | Handle callback |