mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #1089] Spotify Authentication Error in Docker #646
Labels
No labels
api-bug
bug
dependencies
documentation
duplicate
enhancement
external-ide
headless-mode
implicit-grant-flow
invalid
missing-endpoint
pr-welcome
private-api
pull-request
question
spotipy3
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/spotipy#646
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @schebook on GitHub (Apr 26, 2024).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/1089
Hi All,
Trying to containerize my spotipy program in Docker so that I can host it on my Linux server. This is my first time working with Docker and said Linux server, so please bear with me.
Below is my code:
And this is what I have going on in my Dockerfile:
I build my spotify instance in docker and then run the following to establish my environment variables:
The error that I'm getting suggests that there's an issue when spotify's authentication tries to launch a webpage. Is there a way to get around this? Eager to learn! Thanks.
@schebook commented on GitHub (Apr 26, 2024):
I'll also add that I attempted to use the client credentials manager but this unfortunately does not recognize Spotify created playlist IDs.
@dieser-niko commented on GitHub (Apr 27, 2024):
You can pass
open_browser=Falseto the SpotifyOAuth constructor@dieser-niko commented on GitHub (May 3, 2024):
Any updates yet?
I should also add that you might want to expose the port for the redirect url if you didn't do that already.
@schebook commented on GitHub (May 3, 2024):
Hey @dieser-niko ! I've been reworking my whole code and making it a bit more efficient / easier to manage. I'm going to try to dockerize it by giving it access to my .cache file and see if it will no longer have to authorize.
I opened the port but no luck with that. If all else fails, I may try to create a flask server to handle authentication.
@dieser-niko commented on GitHub (May 3, 2024):
That normally shouldn't be a problem. I can help you with Docker in about 3 to 4 hours if you want to.
@schebook commented on GitHub (May 3, 2024):
I appreciate your help! I actually got it to containerize and run within Docker. Passing the .cache file into the container allows it to ride off the former authentication.