[GH-ISSUE #1145] How spotipy have to be setted for deploying? #673

Closed
opened 2026-02-28 00:00:44 +03:00 by kerem · 1 comment
Owner

Originally created by @Mau5trakt on GitHub (Jul 13, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1145

Hello im using Spotipy to make something like last.fm (im running a script every 20 secs to see if all my users are playing music, then register it into a database)
when im in the local enviroment for some reason it ask me to sign up every so often, but now i've deployed and i see the script is trying to open a web browser in the terminal to log into the spotipy aplication. so, how i should work with it?

also i made a custom cache handling that in simple words save the cache token for every user into the database and then when the program that verifies if a user is playing a track ill ask for his tokens creds into the database.

Originally created by @Mau5trakt on GitHub (Jul 13, 2024). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1145 <!--- Please make sure you've: - read the FAQ https://github.com/plamere/spotipy/blob/master/FAQ.md - read the documentation https://spotipy.readthedocs.io/en/latest/ - searched older issues If your question is about code, please share the code you are using ---> Hello im using Spotipy to make something like [last.fm](last.fm) (im running a script every 20 secs to see if all my users are playing music, then register it into a database) when im in the local enviroment for some reason it ask me to sign up every so often, but now i've deployed and i see the script is trying to open a web browser in the terminal to log into the spotipy aplication. so, how i should work with it? also i made a custom cache handling that in simple words save the cache token for every user into the database and then when the program that verifies if a user is playing a track ill ask for his tokens creds into the database.
kerem 2026-02-28 00:00:44 +03:00
  • closed this issue
  • added the
    question
    label
Author
Owner

@dieser-niko commented on GitHub (Jul 13, 2024):

There are several ways to approach this problem. I'd say the app.py example would be a good fit for your application. But if you're deploying frontend and backend separately, I'd recommend something like my spotipy-fastapi-oauth example.

<!-- gh-comment-id:2226863746 --> @dieser-niko commented on GitHub (Jul 13, 2024): There are several ways to approach this problem. I'd say the [app.py](https://github.com/spotipy-dev/spotipy/blob/master/examples/app.py) example would be a good fit for your application. But if you're deploying frontend and backend separately, I'd recommend something like my [spotipy-fastapi-oauth](https://github.com/dieser-niko/spotipy-fastapi-oauth) example.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotipy#673
No description provided.