mirror of
https://github.com/spotipy-dev/spotipy.git
synced 2026-04-27 08:35:49 +03:00
[PR #109] [MERGED] Get new access token 60 seconds before old one times out #773
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#773
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?
📋 Pull Request Information
Original PR: https://github.com/spotipy-dev/spotipy/pull/109
Author: @lwoloszy
Created: 7/27/2016
Status: ✅ Merged
Merged: 12/31/2016
Merged by: @plamere
Base:
master← Head:master📝 Commits (1)
ff7b0f3get new access token ~60 seconds before old one times out📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
spotipy/oauth2.py(+1 -1)📄 Description
On prolonged interactions with the Spotify API, I was running into token timeout errors. I think this was due to the gap between
_is_token_expiredcall and the subsequent GET request sometimes being longer than the time left before token expiry. Returning True if the number of seconds between token timeout and current time was less than 60 solved the problem.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.