Python implementation of authorization code flow with PKCE for the Spotify Web API.
https://developer.spotify.com/documentation/web-api/tutorials/code-pkce-flow
- Install
authlib
dependency - Create a Spotify app
- Create an access token in your Spotify dashboard and make sure the redirect URI is set
- Set environment variables:
SPOTIFY_REDIRECT_URI=http://localhost:80/callback
SPOTIFY_CLIENT_ID=<your-client-id>
See https://developer.spotify.com/documentation/web-api/tutorials/getting-started for more info.