mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #572] How to get an OAuth token on a headless machine? #340
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#340
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 @RaddedMC on GitHub (Sep 5, 2020).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/572
Hey there! I'm not sure if this is the right place to write about my issue, but I'm working on adding spotify integration to my SmartFrame infoboard using the Authorization code flow. The code works perfectly running on my desktop (ubuntu 20.04 LTS), but on my raspberry pi (zero w running dietpi) that is running the infoboard client, the code hangs when calling spotify.current_user_playing_track()
I've dug around and discovered that the problem is related to my raspberry pi being a headless machine, so there is no way for me to log into spotify via a web browser like how I did on my desktop, meaning spotipy is just hanging waiting for an OAuth token.
How would I get an OAuth token on my headless Raspberry PI? I've heard that I can host a web server on the pi but I've never hosted my own web server so I'm not sure where to start there. Would it be possible to copy/paste the OAuth token from my desktop to my rpi? I know that breaks like a million best practices but this is just for a personal project running on my home network and not for anything that's going to be publicly released.
Thanks for any and all help?
trimmed down code, appropriate try/catches and data collection are in my final code:
@stephanebruckert commented on GitHub (Sep 7, 2020):
To solve this we need to do https://github.com/plamere/spotipy/issues/560