[GH-ISSUE #167] Add cache_path as a parameter to prompt_for_user_token() #84

Closed
opened 2026-02-27 23:20:45 +03:00 by kerem · 0 comments
Owner

Originally created by @jessejoe on GitHub (Mar 2, 2017).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/167

Currently prompt_for_user_token() sets cache_path to .cache-username under the user's current directory. This is problematic when using prompt_for_user_token() in other scripts since it will be looking for/creating .cache-username files in whatever directory the user happens to be in. This causes the user to have to re-authenticate and have duplicate files all over.

prompt_for_user_token() should allow the caller to set the cache_path or possibly even default to creating it inside the user's $HOME.

I'm happy to submit a PR for these if either seem like a good idea.

Originally created by @jessejoe on GitHub (Mar 2, 2017). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/167 Currently `prompt_for_user_token()` sets `cache_path` to `.cache-username` under the user's current directory. This is problematic when using `prompt_for_user_token()` in other scripts since it will be looking for/creating `.cache-username` files in whatever directory the user happens to be in. This causes the user to have to re-authenticate and have duplicate files all over. `prompt_for_user_token()` should allow the caller to set the `cache_path` or possibly even default to creating it inside the user's `$HOME`. I'm happy to submit a PR for these if either seem like a good idea.
kerem closed this issue 2026-02-27 23:20:45 +03:00
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#84
No description provided.