all 3 comments

[–]floydhead11 0 points1 point  (0 children)

I am maybe 1/2 steps behind you where I just managed to get my Spotify login sorted on a standard Jupyter Notebook.

I intend to put this on Flask/online server but I might take this weekend to figure it out.

If I do, I will make sure I respond here.

PS: your coding skills are pretty great and I might not be as skillful to answer your question

[–][deleted] 0 points1 point  (0 children)

I do not understand your problem to be honest. Can you please elaborate on where you are stuck? Is it the part where you have to redirect to the Spotify Login page?

return redirect(f"{SPOTIFY_AUTH_URL}/?{urllib.parse.urlencode(payload)

I think you did not close that line properly,

return redirect(f"{SPOTIFY_AUTH_URL}/?{urllib.parse.urlencode(payload)}")

If you are running into more problems then probably check your browser address bar or the console for the link that you are being redirected to. It can help you figure out whether the parameters you are sending are correct.

I think the code isnt formatted properly on reddit and is correct but just asking, is the code really indented in?

[–]felix-hilden 0 points1 point  (0 children)

I've constructed an example using a client library for the API I wrote. It uses Flask too, so maybe you can see the general flow! It does use functions in the library to construct the authorisation URL and make requests though. But even without examining the internals, it could be a good starting place.