[GH-ISSUE #332] Invalid access token even with prompted token #190

Closed
opened 2026-02-27 23:21:18 +03:00 by kerem · 2 comments
Owner

Originally created by @belinhacbr on GitHub (Oct 17, 2018).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/332

I'm using spotipy to fetch albums but I keep having:
spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/album/1zCNrbPpz5OLSr6mSpPdKm: Invalid access token

Installing the package from the master branch, I already:

  • have my spotipy_client_id and spotipy_client_secret as env var
  • added my callback url to my apps dashboard and set the same url as a redirect_uri
  • called prompt_for_user_token with my callback url, user and scope
  • on my callbback, retrieved the code and instanciated the spotify client object with it

Any clue what I missed?
Does it still work with the current state of the api or is no longer maintained?

Originally created by @belinhacbr on GitHub (Oct 17, 2018). Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/332 I'm using spotipy to fetch albums but I keep having: ` spotipy.client.SpotifyException: http status: 401, code:-1 - https://api.spotify.com/v1/album/1zCNrbPpz5OLSr6mSpPdKm: Invalid access token ` Installing the package from the master branch, I already: - have my `spotipy_client_id` and `spotipy_client_secret` as env var - added my callback url to my apps dashboard and set the same url as a `redirect_uri` - called `prompt_for_user_token` with my callback url, user and scope - on my callbback, retrieved the `code` and instanciated the spotify client object with it Any clue what I missed? Does it still work with the current state of the api or is no longer maintained?
kerem closed this issue 2026-02-27 23:21:18 +03:00
Author
Owner

@rashad commented on GitHub (Dec 21, 2019):

@belinhacbr did you eventually managed to make it work ?

<!-- gh-comment-id:568205235 --> @rashad commented on GitHub (Dec 21, 2019): @belinhacbr did you eventually managed to make it work ?
Author
Owner

@stephanebruckert commented on GitHub (Jan 13, 2020):

Hi @belinhacbr, @rashad,

The repo is maintained again and a fresh version has just been released:

pip install spotipy --upgrade

Can you still reproduce this? If yes, please do provide some code

<!-- gh-comment-id:573894081 --> @stephanebruckert commented on GitHub (Jan 13, 2020): Hi @belinhacbr, @rashad, The repo is maintained again and a fresh version has just been released: pip install spotipy --upgrade Can you still reproduce this? If yes, please do provide some code
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#190
No description provided.