protocols/spotify owns Spotify-specific OAuth and Web API transport. Application code should normally depend on controllers/spotify rather than this package directly.
OpenRoadCode uses Spotify OAuth Authorization Code with PKCE. Runtime configuration is read through the project secret-manager abstraction.
Required value:
Optional redirect override:
No client secret is required or expected. Credentials and OAuth tokens must never be committed.
The canonical OAuth scopes are declared in spotify_config.py. They currently cover playback state/control, Web Playback SDK streaming, profile access, saved tracks, recently played tracks, and private playlists. When scopes change, an existing token cache may not contain the new permissions. Re-authorize the cached Spotify token before testing features that depend on newly added scopes.
HTTP paths, JSON parsing into application models, and semantic operations such as saved-library/history retrieval belong in controllers/spotify, not in the transport layer.
OAuth tokens are stored by default at:
Stored access tokens are reused and refreshed when possible. To force authorization after a scope change:
Debian/Ubuntu credentials can be configured with:
Termux uses the corresponding secrets setup under development/termux. Spotify REMOTE mode does not require a local Web Playback browser. PLAYER mode additionally requires a compatible browser; the verified Linux path is Google Chrome stable.
From the repository root:
This package is intentionally transport-focused. Playback policy, Connect destination selection, library presentation, artwork caching, and UI behavior belong in controllers/services/applications. Generic OAuth mechanics remain in protocols.oauth.