mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-26 16:15:51 +03:00
[GH-ISSUE #386] Cannot refresh token (http status: 401, code:-1) #228
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#228
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 @paunovic on GitHub (Jul 2, 2019).
Original GitHub issue: https://github.com/spotipy-dev/spotipy/issues/386
I'm having following code, which is supposed to refresh auth token once it expires:
.execute()is a try..except wrapper around all spotify client calls, so that it can refresh token once it expires. However, I keep getting following errors in succession once it tries to refresh token:refresh_tokenstays the same, andaccess_tokenkeeps changing. Any ideas what am I doing wrong? I was following this issue: https://github.com/plamere/spotipy/issues/83 but it seems like on my end it doesn't work.@shillshocked commented on GitHub (Jul 28, 2019):
I was getting this issue too, but I figured it out thanks to #83 like you mentioned. It's not straightforward, you really have to pay attention, as all the code won't be there or be applicable to you. The way I did class definitions was more in line with their example. Make sure that you're referring to the right object. It seems like your overwriting your refreshed token with an additional token.